Esempio n. 1
0
        public async Task <Protocols.Response.Rss> Create(Protocols.Request.Rss rss)
        {
            var created = await Create(rss.Data);

            return(new Protocols.Response.Rss
            {
                ResultCode = Code.ResultCode.Success,
                Data = created?.ToProtocol()
            });
        }
Esempio n. 2
0
        public async Task <Protocols.Response.Rss> Update(string id, Protocols.Request.Rss rss)
        {
            var update = rss.Data.ToModel();

            var updated = await _mongoDbRss.UpdateAsync(id, update);

            return(new Protocols.Response.Rss
            {
                ResultCode = Code.ResultCode.Success,
                Data = (updated ?? update).ToProtocol()
            });
        }
Esempio n. 3
0
 public async Task <Protocols.Response.Rss> Update(string id, [FromBody] Protocols.Request.Rss rss)
 {
     return(await _rssService.Update(id, rss));
 }
Esempio n. 4
0
 public async Task <Protocols.Response.Rss> Create([FromBody] Protocols.Request.Rss rss)
 {
     return(await _rssService.Create(rss));
 }