예제 #1
0
        public Task <AlpApiResponse> ToggleLockStateByIdFloor([FromBody] int floorId)
        {
            var sessionToken = HttpContext.Request.Headers["sessiontoken"];

            if (!_accountService.Authorize(sessionToken, new List <RoleType> {
                RoleType.Admin
            }))
            {
                return(Task.FromResult(new AlpApiResponse {
                    Success = false, Message = "Nincs jogosultsága ehhez a művelethez!"
                }));
            }
            return(_floorService.ToggleFloorLockStateById(floorId));
        }