예제 #1
0
        public async Task <IActionResult> FollowSpot([FromBody] FollowSpotViewModel model)
        {
            var accessToken = HttpContext.Request.Headers["Authorization"].ToString().GetAccessTokenFromHeaderString();
            var userId      = await _identityService.GetUserId(accessToken);

            var result = await _playerService.AddPlayerSpot(userId, model.SpotId);

            if (result)
            {
                return(Ok(new { IsSuccess = true }));
            }

            return(BadRequest(new { IsSuccess = false }));
        }