public async Task <IActionResult> PostAsync(CreatePrivateRoomRequestPayload payload) { var user = await _currentUserAccessor.GetCurrentUserAsync(); var room = await _roomStorage.CreateRoom(user); return(Ok(new RoomPayload(room))); }
private async Task <(User user, Room room)> getContext() { var user = await _currentUserAccessor.GetCurrentUserAsync(); var room = await _roomStorage.GetRoomByUserId(user.Id); return(user, room); }