Improved results handling in service layer

This commit is contained in:
2026-09-11 10:32:51 +02:00
parent 66f720a20b
commit a15b25248d
11 changed files with 87 additions and 103 deletions
@@ -15,6 +15,6 @@ public sealed class IdentityService(IDbContextFactory<ApplicationDbContext> cont
var userExistsAndActive = await context.Users
.AnyAsync(u => u.Id == userId && u.Status == ActivityStatus.Active, cancellationToken);
return Result.FailIf(!userExistsAndActive, NotFoundError.Create());
return Result.OkIf(userExistsAndActive, NotFoundError.Create());
}));
}