feat: Add RegisterAsync endpoint to AuthController (Refs #2)

This commit is contained in:
2026-04-01 13:15:22 -03:00
parent ab98056075
commit bf2cfbd9fc
3 changed files with 52 additions and 0 deletions

View File

@@ -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;
}
}