public async System.Threading.Tasks.Task PostCloseDoor(string roomAddress, string securityKey) { _conferenceRoomService.SecurityCheck(roomAddress, securityKey); var info = _roomRepository.GetRoomInfo(roomAddress); if (string.IsNullOrEmpty(info?.GdoDeviceId)) { throw new ArgumentException("No door to control"); } await _gdoService.Close(info.GdoDeviceId); }
public async Task PostCloseDoor(string roomId) { var room = _roomRepository.GetRoomInfo(roomId); await AssertRoomIsFromOrg(room); await _conferenceRoomService.SecurityCheck(room); if (string.IsNullOrEmpty(room.GdoDeviceId)) { throw new ArgumentException("No door to control"); } await _gdoService.Close(room.GdoDeviceId); }