revert Update Detailed Product Viev
This commit is contained in:
NW
2024-12-14 12:54:50 +00:00
parent 057d1536bb
commit eea5d9b9e7
3 changed files with 124 additions and 62 deletions

View File

@@ -12,10 +12,9 @@ class ProductService {
static async getDetailedProductById(productId) {
return await db.getAsync(
`SELECT p.*, c.name as category_name, l.country, l.city, l.district
`SELECT p.*, c.name as category_name
FROM products p
JOIN categories c ON p.category_id = c.id
JOIN locations l ON p.location_id = l.id
WHERE p.id = ?`,
[productId]
);