feat: enhance CustomerIndividual and CustomerLegal models with new unique input types
feat: add cache invalidation method for POS middleware feat: implement Redis caching in POS middleware for improved performance feat: refactor sales invoice DTOs for POS to include correction functionality feat: extend SalesInvoicesController to handle invoice corrections and returns feat: update SalesInvoicesService to support invoice correction and return operations feat: enhance TSP provider correction functionality with new DTOs and utility methods fix: improve error handling and logging in Nama provider switch adapter refactor: streamline invoice payload building in TSP provider utilities
This commit is contained in:
@@ -18,13 +18,13 @@ export function checkAndDecodeJwtToken(
|
||||
token = authHeader.slice(7)
|
||||
}
|
||||
}
|
||||
if (!token) throw new UnauthorizedException('Missing accessToken cookie')
|
||||
if (!token) throw new UnauthorizedException('توکن احراز هویت ارسال نشده است')
|
||||
|
||||
try {
|
||||
const payload = jwtService.decode(token) as AccessTokenPayload
|
||||
|
||||
return payload as ITokenPayload
|
||||
} catch {
|
||||
return null
|
||||
throw new UnauthorizedException('توکن احراز هویت نامعتبر است')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ export class RedisKeyMaker extends PartnerKeyMaker {
|
||||
static guildStockKeepingUnitsList = GuildKeyMaker.guildStockKeepingUnitsList
|
||||
static guildGoodsList = GuildKeyMaker.guildGoodsList
|
||||
|
||||
static posMiddleware = PosKeyMaker.middleware
|
||||
static posInfo = PosKeyMaker.info
|
||||
static posMe = PosKeyMaker.me
|
||||
static posGoodsList = PosKeyMaker.goodList
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
export class PosKeyMaker {
|
||||
static middleware(token: string): string {
|
||||
return `pos:${token}:middleware`
|
||||
}
|
||||
|
||||
static info(posId: string): string {
|
||||
return `pos:${posId}:info`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user