fix non-null register attributes
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 8s
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 8s
This commit is contained in:
@@ -22,7 +22,10 @@ public class AuthController : ControllerBase {
|
|||||||
public async Task<ActionResult> Register(RegisterDto dto) {
|
public async Task<ActionResult> Register(RegisterDto dto) {
|
||||||
var user = new User {
|
var user = new User {
|
||||||
Name = dto.Username,
|
Name = dto.Username,
|
||||||
PasswordHash = BCrypt.Net.BCrypt.HashPassword(dto.Password) // TODO: hashing stage in client
|
Email = "dummy@goofy.xyz",
|
||||||
|
PasswordHash = BCrypt.Net.BCrypt.HashPassword(dto.Password), // TODO: secondary hashing stage in client
|
||||||
|
Role = "admin (FOR NOW !!)",
|
||||||
|
CreatedAt = DateTime.UtcNow // yeah why not utc
|
||||||
};
|
};
|
||||||
|
|
||||||
var newUser = await users_.Create(user);
|
var newUser = await users_.Create(user);
|
||||||
|
|||||||
Reference in New Issue
Block a user