public async Task <TorrentView> Put(int id, TorrentUpdateView model) { var torrent = _mapper.Map <Torrent>(model); var result = await _torrentService.UpdateAsync(id, torrent); return(_mapper.Map <TorrentView>(result)); }
public async Task <TorrentView> UpdateAsync(int id, TorrentUpdateView model) { var url = string.Format(_apiOptions.Torrent, id.ToString()); return(await _httpClientService.PutJsonAsync <TorrentView>(url, model)); }