public async Task <TorrentView> Post(TorrentCreateView model) { var torrent = _mapper.Map <Torrent>(model); var result = await _torrentService.AddAsync(torrent); return(_mapper.Map <TorrentView>(result)); }
public async Task <TorrentView> AddAsync(TorrentCreateView model) { return(await _httpClientService.PostJsonAsync <TorrentView>(_apiOptions.Torrents, model)); }