fix(unit-2-auth): Redirect to /setup on API failure; store owner display name
- Router catch block now falls back to { initialized: false } instead of
silently continuing, preventing unwanted redirect to /login when the
API call fails at startup
- Add Name field to CreateOwnerRequest and propagate to ApplicationUser.DisplayName
so the owner's display name is stored during initial setup
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ public class SetupController : ControllerBase
|
||||
[HttpPost("owner")]
|
||||
public async Task<IActionResult> CreateOwner([FromBody] CreateOwnerRequest request)
|
||||
{
|
||||
await _setupService.CreateInitialOwnerAsync(request.Email, request.Password);
|
||||
await _setupService.CreateInitialOwnerAsync(request.Name, request.Email, request.Password);
|
||||
return Ok(new { Message = "Systeem succesvol geïnitialiseerd. De eerste eigenaar is aangemaakt." });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user