fix(admin): resolve 500 on missing product update and add direct image URL & paste support
Deploy Canina / deploy (push) Has been cancelled

This commit is contained in:
parsa aghaei committed 2026-07-29 16:42:23 +03:30
1 parent a3291cc468
commit 9c8286c63f
3 files changed
+63 -14

No files matched your search

+5
View File
@@ -168,6 +168,11 @@ export class AdminService {
}
async updateProduct(id: string, data: any) {
const existing = await this.prisma.product.findUnique({ where: { id } });
if (!existing) {
throw new NotFoundException(`محصولی با شناسه ${id} یافت نشد.`);
}
const product = await this.prisma.product.update({
where: { id },
data: {