mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-05-12 10:39:43 +08:00
fix(user): include role when getting user by email
This commit is contained in:
@@ -106,7 +106,7 @@ public class UserService(IDbContextFactory<MyDbContext> dbContextFactory, IConfi
|
||||
|
||||
await using var context = await dbContextFactory.CreateDbContextAsync();
|
||||
|
||||
var user = await context.Users.FirstOrDefaultAsync(u => u.Email == email);
|
||||
var user = await context.Users.Include(x => x.Role).FirstOrDefaultAsync(u => u.Email == email);
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user