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

            if (user == null)
            {
                return(new ForbidResult());
            }
            if (!Enum.IsDefined(typeof(ApiType), feed.ApiType))
            {
                return(new ConflictResult());
            }
            return(new ObjectResult(await _feedService.CreateAsync(feed.ToFeed(user))));
        }