Example #1
0
        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));
        }
Example #2
0
        public async Task <TorrentView> UpdateAsync(int id, TorrentUpdateView model)
        {
            var url = string.Format(_apiOptions.Torrent, id.ToString());

            return(await _httpClientService.PutJsonAsync <TorrentView>(url, model));
        }