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() }); }
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() }); }
public async Task <Protocols.Response.Rss> Update(string id, [FromBody] Protocols.Request.Rss rss) { return(await _rssService.Update(id, rss)); }
public async Task <Protocols.Response.Rss> Create([FromBody] Protocols.Request.Rss rss) { return(await _rssService.Create(rss)); }