Add SMS OTP auth, discounts, customer orders, and category slugs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-05 15:15:10 +03:30
co-authored by Cursor
parent 58380ab81d
commit d09eca8702
48 changed files with 1719 additions and 38 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import { PassportStrategy } from '@nestjs/passport';
import { UserRole } from '@prisma/client';
import { ExtractJwt, Strategy } from 'passport-jwt';
import { PrismaService } from '../../prisma/prisma.service';
import { AuthUser, isElevatedRole } from '../auth.types';
import { AuthUser } from '../auth.types';
type JwtPayload = {
sub: string;
@@ -29,7 +29,7 @@ export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') {
where: { id: payload.sub },
});
if (!user || user.disabled || !isElevatedRole(user.role)) {
if (!user || user.disabled) {
throw new UnauthorizedException('نشست نامعتبر است');
}