Пример #1
0
        public async Task <IActionResult> SetStatus(long id, [FromBody] SetReservationStatusDTO reservationStatus)
        {
            // check if requester is allowed to set reservation status
            if (!await _permissionService.CanSetReservationStatus(id, HttpContext.GetUserIdFromToken()))
            {
                return(Forbid());
            }

            return(Ok(await _reservationService.SetReservationStatus(id, reservationStatus)));
        }