Example #1
0
        public async Task <IActionResult> RemoveFollower(int followerId)
        {
            await _ClubMembersService.RemoveFollowerAsync(followerId);

            _logger.LogInformation($"Follower with ID {{{followerId}}} was removed.");

            return(Ok());
        }
Example #2
0
        public async Task <IActionResult> RemoveClubFollower(int ClubId, int followerId)
        {
            try
            {
                await _ClubMembersService.RemoveFollowerAsync(followerId);

                _logger.LogInformation($"Follower with id {followerId} was removed.");

                return(RedirectToAction("ClubFollowers", "Club", new { Clubid = ClubId }));
            }
            catch (Exception e)
            {
                _logger.LogError($"Exception :{e.Message}");

                return(RedirectToAction("HandleError", "Error", new { code = StatusCodes.Status505HttpVersionNotsupported }));
            }
        }