refactor: remove console logs, update SaleInvoicePayload interface, and enhance GoodCategoriesService response mapping
This commit is contained in:
@@ -25,9 +25,6 @@ export class JwtAuthGuard implements CanActivate {
|
||||
|
||||
const req = context.switchToHttp().getRequest<IWithJWTPayloadRequest>()
|
||||
|
||||
// Log headers to inspect whether Authorization is present
|
||||
|
||||
// Try token from cookie first, then from Authorization header (Bearer)
|
||||
let token: string | undefined = req.cookies?.accessToken
|
||||
if (!token) {
|
||||
const authHeader = (req.headers.authorization || req.headers.Authorization) as
|
||||
@@ -45,8 +42,6 @@ export class JwtAuthGuard implements CanActivate {
|
||||
secret: process.env.JWT_SECRET || 'secret',
|
||||
})
|
||||
|
||||
console.log(payload)
|
||||
|
||||
if (payload.type !== 'POS')
|
||||
throw new UnauthorizedException('Invalid or expired token')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user