feat: complete settings sync, standard UI inputs, prescriptions flow, pet profile and checkout enhancements
Deploy Canina / deploy (push) Failing after 51s

This commit is contained in:
parsa aghaei committed 2026-08-17 11:46:49 +03:30
1 parent b3c60a1a7d
commit 6df92f03d7
32 files changed
+61750 -59151

No files matched your search

+19 -2
View File
@@ -126,12 +126,29 @@ export class ProductsService {
}
async findOne(idOrSlug: string, userRole?: string) {
if (!idOrSlug) return null;
const decoded = decodeURIComponent(idOrSlug).trim();
const cleanId = idOrSlug.trim();
const isUuid =
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
idOrSlug,
cleanId,
);
const product = await this.prisma.product.findFirst({
where: isUuid ? { id: idOrSlug } : { slug: idOrSlug },
where: isUuid
? { id: cleanId }
: {
OR: [
{ slug: cleanId },
{ slug: decoded },
{ artNo: cleanId },
{ artNo: decoded },
{ nameFa: cleanId },
{ nameFa: decoded },
{ nameEn: cleanId },
{ nameEn: decoded },
],
},
include: {
ingredientList: true,
symptoms: true,