コード例 #1
0
        public async Task <IActionResult> PostAsync(CreatePrivateRoomRequestPayload payload)
        {
            var user = await _currentUserAccessor.GetCurrentUserAsync();

            var room = await _roomStorage.CreateRoom(user);

            return(Ok(new RoomPayload(room)));
        }
コード例 #2
0
        private async Task <(User user, Room room)> getContext()
        {
            var user = await _currentUserAccessor.GetCurrentUserAsync();

            var room = await _roomStorage.GetRoomByUserId(user.Id);

            return(user, room);
        }