public async Task <IActionResult> AcceptFriendInvite([FromBody] FriendResponse request)
        {
            try
            {
                Player player = (Player)HttpContext.Items["SessionPlayer"];

                FriendInvite friendRequest = new FriendInvite();
                friendRequest.playerId       = request.username;
                friendRequest.targetPlayerId = player.username;
                await _service.AcceptFriendInvite(friendRequest, request.response);

                return(Ok(new Success("Invite handled successfully.")));
            }
            catch (EntityNotFoundException e)
            {
                if (e is FriendRequestNotFound)
                {
                    return(BadRequest(new Error("FriendRequestNotFound", e.Message)));
                }
                return(NotFound(new Error("UserNotFound", "User Not Found.")));
            }
            catch (Exception exc)
            {
                this._logger.LogError(exc, exc.Message);
                return(StatusCode(500));
            }
        }