mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-09-08 17:16:50 +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();
|
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)
|
if (user == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user