public async Task <IActionResult> RemoveAdminUser([FromBody] RemoveUserAdminRequest request) { var requestMapped = _mapper.Map <RemoveUserAdminRequest, BlRemoveUserAdminRequest>(request); await _businessLogic.RemoveUserAdmin(requestMapped); return(Ok()); }
public static void DeleteUser(string baseUrl, RemoveUserAdminRequest request) { try { _client = new RestClient(baseUrl); var apiRequest = new RestRequest(Method.DELETE) { Resource = "/api/UserApi", RequestFormat = DataFormat.Json }; apiRequest.AddBody(request); var response = _client.Execute(apiRequest); // var data = JsonConvert.DeserializeObject<IEnumerable<AdministratorListResponse>>(response.Content); } catch (Exception e) { throw new Exception(e.Message); } }
public IActionResult DeleteAdminUser([FromBody] RemoveUserAdminRequest request) { UserAPI.DeleteUser($"http://{Request.Host}", request); return(Ok(request)); }