Browse Source

Fix inconsistent REST API urls.

pull/1401/head
maliming 7 years ago
parent
commit
6fa00321c0
  1. 2
      modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs
  2. 2
      modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs
  3. 2
      modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserLookupController.cs
  4. 6
      modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/ProfileController.cs
  5. 15
      modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/TenantController.cs

2
modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityRoleController.cs

@ -10,7 +10,7 @@ namespace Volo.Abp.Identity
[RemoteService] [RemoteService]
[Area("identity")] [Area("identity")]
[ControllerName("Role")] [ControllerName("Role")]
[Route("api/identity/role")] [Route("api/identity/roles")]
public class IdentityRoleController : AbpController, IIdentityRoleAppService public class IdentityRoleController : AbpController, IIdentityRoleAppService
{ {
private readonly IIdentityRoleAppService _roleAppService; private readonly IIdentityRoleAppService _roleAppService;

2
modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs

@ -9,7 +9,7 @@ namespace Volo.Abp.Identity
[RemoteService] [RemoteService]
[Area("identity")] [Area("identity")]
[ControllerName("User")] [ControllerName("User")]
[Route("api/identity/user")] [Route("api/identity/users")]
public class IdentityUserController : AbpController, IIdentityUserAppService public class IdentityUserController : AbpController, IIdentityUserAppService
{ {
private readonly IIdentityUserAppService _userAppService; private readonly IIdentityUserAppService _userAppService;

2
modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserLookupController.cs

@ -9,7 +9,7 @@ namespace Volo.Abp.Identity
[RemoteService] [RemoteService]
[Area("identity")] [Area("identity")]
[ControllerName("UserLookup")] [ControllerName("UserLookup")]
[Route("api/identity/user-lookup")] [Route("api/identity/user-lookups")]
public class IdentityUserLookupController : AbpController, IIdentityUserLookupAppService public class IdentityUserLookupController : AbpController, IIdentityUserLookupAppService
{ {
protected IIdentityUserLookupAppService LookupAppService { get; } protected IIdentityUserLookupAppService LookupAppService { get; }

6
modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/ProfileController.cs

@ -7,6 +7,7 @@ namespace Volo.Abp.Identity
[RemoteService] [RemoteService]
[Area("identity")] [Area("identity")]
[ControllerName("Profile")] [ControllerName("Profile")]
[Route("/api/identity/profiles")]
public class ProfileController : AbpController, IProfileAppService public class ProfileController : AbpController, IProfileAppService
{ {
private readonly IProfileAppService _profileAppService; private readonly IProfileAppService _profileAppService;
@ -15,16 +16,21 @@ namespace Volo.Abp.Identity
{ {
_profileAppService = profileAppService; _profileAppService = profileAppService;
} }
[HttpGet]
public Task<ProfileDto> GetAsync() public Task<ProfileDto> GetAsync()
{ {
return _profileAppService.GetAsync(); return _profileAppService.GetAsync();
} }
[HttpPut]
public Task<ProfileDto> UpdateAsync(UpdateProfileDto input) public Task<ProfileDto> UpdateAsync(UpdateProfileDto input)
{ {
return _profileAppService.UpdateAsync(input); return _profileAppService.UpdateAsync(input);
} }
[HttpPost]
[Route("ChangePassword")]
public Task ChangePasswordAsync(string currentPassword, string newPassword) public Task ChangePasswordAsync(string currentPassword, string newPassword)
{ {
return _profileAppService.ChangePasswordAsync(currentPassword, newPassword); return _profileAppService.ChangePasswordAsync(currentPassword, newPassword);

15
modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo/Abp/TenantManagement/TenantController.cs

@ -9,6 +9,7 @@ namespace Volo.Abp.TenantManagement
[Controller] [Controller]
[RemoteService] [RemoteService]
[Area("multi-tenancy")] [Area("multi-tenancy")]
[Route("api/multi-tenancy/tenants")]
public class TenantController : AbpController, ITenantAppService //TODO: Throws exception on validation if we inherit from Controller public class TenantController : AbpController, ITenantAppService //TODO: Throws exception on validation if we inherit from Controller
{ {
private readonly ITenantAppService _service; private readonly ITenantAppService _service;
@ -18,41 +19,55 @@ namespace Volo.Abp.TenantManagement
_service = service; _service = service;
} }
[HttpGet]
[Route("{id}")]
public virtual Task<TenantDto> GetAsync(Guid id) public virtual Task<TenantDto> GetAsync(Guid id)
{ {
return _service.GetAsync(id); return _service.GetAsync(id);
} }
[HttpGet]
public virtual Task<PagedResultDto<TenantDto>> GetListAsync(GetTenantsInput input) public virtual Task<PagedResultDto<TenantDto>> GetListAsync(GetTenantsInput input)
{ {
return _service.GetListAsync(input); return _service.GetListAsync(input);
} }
[HttpPost]
public virtual Task<TenantDto> CreateAsync(TenantCreateDto input) public virtual Task<TenantDto> CreateAsync(TenantCreateDto input)
{ {
return _service.CreateAsync(input); return _service.CreateAsync(input);
} }
[HttpPut]
[Route("{id}")]
public virtual Task<TenantDto> UpdateAsync(Guid id, TenantUpdateDto input) public virtual Task<TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
{ {
return _service.UpdateAsync(id, input); return _service.UpdateAsync(id, input);
} }
[HttpDelete]
[Route("{id}")]
public virtual Task DeleteAsync(Guid id) public virtual Task DeleteAsync(Guid id)
{ {
return _service.DeleteAsync(id); return _service.DeleteAsync(id);
} }
[HttpGet]
[Route("{id}/DefaultConnectionString")]
public Task<string> GetDefaultConnectionStringAsync(Guid id) public Task<string> GetDefaultConnectionStringAsync(Guid id)
{ {
return _service.GetDefaultConnectionStringAsync(id); return _service.GetDefaultConnectionStringAsync(id);
} }
[HttpPut]
[Route("{id}/DefaultConnectionString")]
public Task UpdateDefaultConnectionStringAsync(Guid id, string defaultConnectionString) public Task UpdateDefaultConnectionStringAsync(Guid id, string defaultConnectionString)
{ {
return _service.UpdateDefaultConnectionStringAsync(id, defaultConnectionString); return _service.UpdateDefaultConnectionStringAsync(id, defaultConnectionString);
} }
[HttpDelete]
[Route("{id}/DefaultConnectionString")]
public Task DeleteDefaultConnectionStringAsync(Guid id) public Task DeleteDefaultConnectionStringAsync(Guid id)
{ {
return _service.DeleteDefaultConnectionStringAsync(id); return _service.DeleteDefaultConnectionStringAsync(id);

Loading…
Cancel
Save