Compare commits

...
Author SHA1 Message Date
marcos-silva-rodrigues bcfef8359e FIX: return null when not found theme 2025-01-31 13:39:15 -03:00
+4 -2
View File
@@ -109,8 +109,10 @@ export class ThemeController {
try {
const data = await this.themeService.getThemeByCustomer(id);
this.logger.info('Success - getCustomerTheme with id'+ id);
return data;
this.logger.info('Success - getCustomerTheme'+ JSON.stringify(data));
if (data?.theme) return data;
return { theme: null };
}catch (err) {
if (err.details === ErrorCodes.CUSTOMER.NOT_FOUND) {
this.logger.error('Error - getCustomerTheme - Expect CUSTOMER.NOT_FOUND');