feat(devops,docs,verify): implement Phase 4 CI pipeline, OpenAPI synchronization, and E2E verification matrix
Deploy Canina / deploy (push) Failing after 28s
Deploy Canina / deploy (push) Failing after 28s
This commit is contained in:
1 parent
27abaa3e05
commit
ad3f149789
25 files changed
+3582
-212
No files matched your search
@@ -174,13 +174,20 @@ export class AuthService {
|
||||
|
||||
// First check database for user with role 'Admin' or 'SUPER_ADMIN'
|
||||
const dbAdmin = await this.prisma.user.findFirst({
|
||||
where: { email: body.email, role: { in: ['Admin', 'SUPER_ADMIN', 'ADMIN'] } },
|
||||
where: {
|
||||
email: body.email,
|
||||
role: { in: ['Admin', 'SUPER_ADMIN', 'ADMIN'] },
|
||||
},
|
||||
});
|
||||
|
||||
if (dbAdmin && dbAdmin.password) {
|
||||
const isMatch = await bcrypt.compare(body.password, dbAdmin.password);
|
||||
if (isMatch) {
|
||||
const payload = { sub: dbAdmin.id, email: dbAdmin.email, role: dbAdmin.role };
|
||||
const payload = {
|
||||
sub: dbAdmin.id,
|
||||
email: dbAdmin.email,
|
||||
role: dbAdmin.role,
|
||||
};
|
||||
return {
|
||||
success: true,
|
||||
data: {
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
export * from '../common/guards/roles.guard';
|
||||
|
||||
Reference in new issue
Block a user