Added skoruba api integration
This commit is contained in:
@@ -12,9 +12,10 @@ public sealed class IdentityService(IDbContextFactory<ApplicationDbContext> cont
|
||||
{
|
||||
await using var context = await contextFactory.CreateDbContextAsync(cancellationToken);
|
||||
|
||||
// TODO: Ensure TenantUser status is checked
|
||||
var userExistsAndActive = await context.Users
|
||||
.AnyAsync(u => u.Id == userId && u.Status == ActivityStatus.Active, cancellationToken);
|
||||
var userExistsAndActive = await context.TenantUsers
|
||||
.Include(i => i.User)
|
||||
.AnyAsync(u => u.UserId == userId && u.Status == ActivityStatus.Active &&
|
||||
u.User!.Status == ActivityStatus.Active, cancellationToken);
|
||||
|
||||
return Result.OkIf(userExistsAndActive, NotFoundError.Create());
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user