user dtos as strict object templates
This commit is contained in:
@@ -22,9 +22,9 @@ public class AuthController : ControllerBase {
|
||||
public async Task<ActionResult> Register(RegisterDto dto) {
|
||||
var user = new User {
|
||||
Name = dto.Username,
|
||||
Email = "dummy@goofy.xyz",
|
||||
Email = dto.Email,
|
||||
PasswordHash = BCrypt.Net.BCrypt.HashPassword(dto.Password), // TODO: secondary hashing stage in client
|
||||
Role = "admin (FOR NOW !!)",
|
||||
Role = "user",
|
||||
CreatedAt = DateTime.UtcNow // yeah why not utc
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user