public async Task <ServiceResponse <RoleDto> > AddRole(RoleDtoAdd newRole) { try { var data = await Post <RoleDtoAdd, Role, RoleDto>(newRole); return(ResponseResult.Success(data)); } catch (Exception ex) { return(ResponseResult.Failure <RoleDto>($"Bad Request : {ex.Message}")); } }
public async Task <IActionResult> UpdateRole(string id, RoleDtoAdd newRole) { var result = await _auth.UpdateRole(id, newRole); return(Ok(result)); }
public async Task <IActionResult> AddRole(RoleDtoAdd newRole) { var result = await _auth.AddRole(newRole); return(Ok(result)); }