public async Task Enable(string applicationName) { using (var httpClient = new HttpClient()) { var dto = new EnableApplicationRequestDto() { Name = applicationName }; var response = await httpClient.PostAsJsonAsync(_apiManagementConfiguration.BaseUrl + "api/application/enable", dto); response.EnsureSuccessStatusCode(); _memoryCache.Remove(CacheKey.Applications); } }
public async Task <IActionResult> Enable(EnableApplicationRequestDto requestDto) { await _applicationService.Enable(requestDto.Name); return(Ok()); }