This commit is contained in:
@@ -12,7 +12,16 @@ public class AdminUserRepository : BaseRepository, IAdminUserRepository
|
||||
{
|
||||
using var conn = _connectionFactory.CreateConnection();
|
||||
return await conn.QueryFirstOrDefaultAsync<AdminUser>(
|
||||
"SELECT * FROM admin_users WHERE username = @username",
|
||||
"""
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
password_hash AS PasswordHash,
|
||||
last_login_at AS LastLoginAt,
|
||||
created_at AS CreatedAt
|
||||
FROM admin_users
|
||||
WHERE username = @username
|
||||
""",
|
||||
new { username });
|
||||
}
|
||||
|
||||
@@ -20,7 +29,16 @@ public class AdminUserRepository : BaseRepository, IAdminUserRepository
|
||||
{
|
||||
using var conn = _connectionFactory.CreateConnection();
|
||||
return await conn.QueryFirstOrDefaultAsync<AdminUser>(
|
||||
"SELECT * FROM admin_users WHERE id = @id",
|
||||
"""
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
password_hash AS PasswordHash,
|
||||
last_login_at AS LastLoginAt,
|
||||
created_at AS CreatedAt
|
||||
FROM admin_users
|
||||
WHERE id = @id
|
||||
""",
|
||||
new { id });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user