Skip to content

Commit

Permalink
Identity Cookbook: fe latest prod build
Browse files Browse the repository at this point in the history
  • Loading branch information
zakariabijoy committed Nov 26, 2023
1 parent f057f41 commit 3530337
Show file tree
Hide file tree
Showing 6 changed files with 575 additions and 3 deletions.
4 changes: 2 additions & 2 deletions API/Controllers/AccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public async Task<ActionResult<UserDto>> Login(LoginDto loginDto)

[AllowAnonymous]
[HttpPost("register")]
public async Task<ActionResult> Register(RegisterDto registerDto)
public async Task<IActionResult> Register(RegisterDto registerDto)
{
if(await _userManager.Users.AnyAsync(x => x.UserName == registerDto.Username))
{
Expand All @@ -90,7 +90,7 @@ public async Task<ActionResult> Register(RegisterDto registerDto)

var result = await _userManager.CreateAsync(user, registerDto.Password);

if(!result.Succeeded) return BadRequest("Problem registerning user");
if(!result.Succeeded) return BadRequest("Problem registering user");

var origin = Request.Headers["origin"];
var token = await _userManager.GenerateEmailConfirmationTokenAsync(user);
Expand Down
Loading

0 comments on commit 3530337

Please sign in to comment.