Separate AuthRequest and RegistrationRequest
This commit is contained in:
parent
3a466b2e0c
commit
6fde3ede7c
2 changed files with 4 additions and 1 deletions
|
@ -69,7 +69,7 @@ public class AuthController(DatabaseContext db, UserService userSvc) : Controlle
|
|||
[ProducesResponseType(StatusCodes.Status400BadRequest, Type = typeof(ErrorResponse))]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized, Type = typeof(ErrorResponse))]
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden, Type = typeof(ErrorResponse))]
|
||||
public async Task<IActionResult> Register([FromBody] AuthRequest request) {
|
||||
public async Task<IActionResult> Register([FromBody] RegistrationRequest request) {
|
||||
//TODO: captcha support
|
||||
//TODO: invite support
|
||||
|
||||
|
|
|
@ -5,5 +5,8 @@ namespace Iceshrimp.Backend.Controllers.Schemas;
|
|||
public class AuthRequest {
|
||||
[J("username")] public required string Username { get; set; }
|
||||
[J("password")] public required string Password { get; set; }
|
||||
}
|
||||
|
||||
public class RegistrationRequest : AuthRequest {
|
||||
[J("invite")] public string? Invite { get; set; }
|
||||
}
|
Loading…
Add table
Reference in a new issue