public async Task <IActionResult> UpvotePhrase(Guid phraseId) { var request = new UpvotePhraseRequest(phraseId); await _phraseApiClient.UpvotePhrase(request); return(Ok()); }
public async Task UpvotePhrase(UpvotePhraseRequest request) { var url = _urls.Phrase + UrlsConfig.PhraseOperations.UpvotePhrase(request.PhraseId); var content = new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, "application/json"); var response = await _httpClient.PutAsync(url, content); response.EnsureSuccessStatusCode(); }