-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
AccountController.cs
47 lines (40 loc) · 1.33 KB
/
AccountController.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
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Identity;
namespace Volo.Abp.Account;
[RemoteService(Name = AccountRemoteServiceConsts.RemoteServiceName)]
[Area(AccountRemoteServiceConsts.ModuleName)]
[Route("api/account")]
public class AccountController : AbpControllerBase, IAccountAppService
{
protected IAccountAppService AccountAppService { get; }
public AccountController(IAccountAppService accountAppService)
{
AccountAppService = accountAppService;
}
[HttpPost]
[Route("register")]
public virtual Task<IdentityUserDto> RegisterAsync(RegisterDto input)
{
return AccountAppService.RegisterAsync(input);
}
[HttpPost]
[Route("send-password-reset-code")]
public virtual Task SendPasswordResetCodeAsync(SendPasswordResetCodeDto input)
{
return AccountAppService.SendPasswordResetCodeAsync(input);
}
[HttpPost]
[Route("verify-password-reset-token")]
public Task<bool> VerifyPasswordResetTokenAsync(VerifyPasswordResetTokenInput input)
{
return AccountAppService.VerifyPasswordResetTokenAsync(input);
}
[HttpPost]
[Route("reset-password")]
public virtual Task ResetPasswordAsync(ResetPasswordDto input)
{
return AccountAppService.ResetPasswordAsync(input);
}
}