feat: Add RegisterAsync endpoint to AuthController (Refs #2)
This commit is contained in:
@@ -86,4 +86,21 @@ public class UserRepository : IUserRepository
|
||||
new { Username = username },
|
||||
commandType: CommandType.StoredProcedure);
|
||||
}
|
||||
|
||||
public async Task<User> RegisterAsync(User user)
|
||||
{
|
||||
using var connection = CreateConnection();
|
||||
var result = await connection.QuerySingleAsync<User>(
|
||||
"sp_User_Register",
|
||||
new
|
||||
{
|
||||
user.Username,
|
||||
user.PasswordHash,
|
||||
user.Email,
|
||||
user.NombreCompleto
|
||||
},
|
||||
commandType: CommandType.StoredProcedure);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user