feat: suporte a múltiplos sellerId e melhorias no código

- Adicionado suporte para sellerId como string separada por vírgula (ex: 270,431)
- Melhorias em deb.repository: tipagem e documentação
- Melhorias em deb.service: remoção de validação redundante
- Melhorias em deb.controller: remoção de try/catch duplicado
- Melhorias em orders.service: early returns e tipagem melhorada
- Aplicado early returns para reduzir aninhamento
- Melhorias de tipagem em todos os métodos
This commit is contained in:
JurTI-BR
2025-11-03 18:05:14 -03:00
parent 3849fa1c4e
commit 25975fc0b0
17 changed files with 291 additions and 300 deletions

View File

@@ -11,7 +11,14 @@ export class RedisClientAdapter implements IRedisClient {
async get<T>(key: string): Promise<T | null> {
const data = await this.redis.get(key);
return data ? JSON.parse(data) : null;
if (!data) return null;
try {
return JSON.parse(data);
} catch (error) {
// If it's not valid JSON, return the raw string value
return data as T;
}
}
async set<T>(key: string, value: T, ttlSeconds = 300): Promise<void> {