diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs index 7e0085189f..d0e39030bd 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs @@ -10,6 +10,7 @@ namespace Volo.Abp.Identity [RemoteService] [Area("identity")] [ControllerName("Role")] + [Route("api/identity/role")] public class IdentityRoleController : AbpController, IIdentityRoleAppService { private readonly IIdentityRoleAppService _roleAppService; @@ -19,31 +20,41 @@ namespace Volo.Abp.Identity _roleAppService = roleAppService; } + [HttpGet] + [Route("{id}")] public virtual Task GetAsync(Guid id) { return _roleAppService.GetAsync(id); } + [HttpGet] public virtual Task> GetListAsync(GetIdentityRolesInput input) { return _roleAppService.GetListAsync(input); } + [HttpPost] public virtual Task CreateAsync(IdentityRoleCreateDto input) { return _roleAppService.CreateAsync(input); } + [HttpPut] + [Route("{id}")] public virtual Task UpdateAsync(Guid id, IdentityRoleUpdateDto input) { return _roleAppService.UpdateAsync(id, input); } + [HttpDelete] + [Route("{id}")] public virtual Task DeleteAsync(Guid id) { return _roleAppService.DeleteAsync(id); } + [HttpGet] + [Route("all")] public virtual Task> GetAllListAsync() { return _roleAppService.GetAllListAsync(); diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs index acbc211b0f..18fd43e1fe 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Application.Dtos; @@ -9,6 +9,7 @@ namespace Volo.Abp.Identity [RemoteService] [Area("identity")] [ControllerName("User")] + [Route("api/identity/user")] public class IdentityUserController : AbpController, IIdentityUserAppService { private readonly IIdentityUserAppService _userAppService; @@ -18,48 +19,62 @@ namespace Volo.Abp.Identity _userAppService = userAppService; } + [HttpGet] + [Route("{id}")] public virtual Task GetAsync(Guid id) { return _userAppService.GetAsync(id); } + [HttpGet] public virtual Task> GetListAsync(GetIdentityUsersInput input) { return _userAppService.GetListAsync(input); } + [HttpPost] public virtual Task CreateAsync(IdentityUserCreateDto input) { return _userAppService.CreateAsync(input); } + [HttpPut] + [Route("{id}")] public virtual Task UpdateAsync(Guid id, IdentityUserUpdateDto input) { return _userAppService.UpdateAsync(id, input); } + [HttpDelete] + [Route("{id}")] public virtual Task DeleteAsync(Guid id) { return _userAppService.DeleteAsync(id); } + [HttpGet] + [Route("{id}/roles")] public virtual Task> GetRolesAsync(Guid id) { return _userAppService.GetRolesAsync(id); } + [HttpPut] + [Route("{id}/roles")] public virtual Task UpdateRolesAsync(Guid id, IdentityUserUpdateRolesDto input) { return _userAppService.UpdateRolesAsync(id, input); } [HttpGet] + [Route("by-username/{userName}")] public virtual Task FindByUsernameAsync(string username) { return _userAppService.FindByUsernameAsync(username); } [HttpGet] + [Route("by-email/{email}")] public virtual Task FindByEmailAsync(string email) { return _userAppService.FindByEmailAsync(email);