-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
IdentityRoleController.cs
62 lines (53 loc) · 1.59 KB
/
IdentityRoleController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using System.Threading.Tasks;
using Asp.Versioning;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
namespace Volo.Abp.Identity;
[RemoteService(Name = IdentityRemoteServiceConsts.RemoteServiceName)]
[Area(IdentityRemoteServiceConsts.ModuleName)]
[ControllerName("Role")]
[Route("api/identity/roles")]
public class IdentityRoleController : AbpControllerBase, IIdentityRoleAppService
{
protected IIdentityRoleAppService RoleAppService { get; }
public IdentityRoleController(IIdentityRoleAppService roleAppService)
{
RoleAppService = roleAppService;
}
[HttpGet]
[Route("all")]
public virtual Task<ListResultDto<IdentityRoleDto>> GetAllListAsync()
{
return RoleAppService.GetAllListAsync();
}
[HttpGet]
public virtual Task<PagedResultDto<IdentityRoleDto>> GetListAsync(GetIdentityRolesInput input)
{
return RoleAppService.GetListAsync(input);
}
[HttpGet]
[Route("{id}")]
public virtual Task<IdentityRoleDto> GetAsync(Guid id)
{
return RoleAppService.GetAsync(id);
}
[HttpPost]
public virtual Task<IdentityRoleDto> CreateAsync(IdentityRoleCreateDto input)
{
return RoleAppService.CreateAsync(input);
}
[HttpPut]
[Route("{id}")]
public virtual Task<IdentityRoleDto> UpdateAsync(Guid id, IdentityRoleUpdateDto input)
{
return RoleAppService.UpdateAsync(id, input);
}
[HttpDelete]
[Route("{id}")]
public virtual Task DeleteAsync(Guid id)
{
return RoleAppService.DeleteAsync(id);
}
}