Exemplo n.º 1
0
        public async Task <IActionResult> RemoveRssFeed(int feedId)
        {
            var user = await _authenticator.VerifyClaim(HttpContext.Request.Cookies["sessionKey"]);

            if (user == null)
            {
                return(new ForbidResult());
            }
            if (!await _feedService.CheckOwnership(user.Id, feedId))
            {
                return(new ForbidResult());
            }
            await _feedService.DeleteAsync(feedId);

            return(new OkResult());
        }