feat(bom): add LLM prompt modal and fix product name resolution
This commit is contained in:
1 parent
a647c9682d
commit
3c05562ae6
3 files changed
+366
-7
No files matched your search
@@ -471,9 +471,9 @@ export const productsRoute = new Elysia({ prefix: "/products" })
|
||||
if (!product || (!includeDeleted && product.isDeleted)) return status(404, { message: "Product not found" });
|
||||
|
||||
if (lang === 'all') {
|
||||
const nameObj: any = {};
|
||||
const descObj: any = {};
|
||||
const detailsObj: any = {};
|
||||
const nameObj: any = product.name ? { th: product.name } : {};
|
||||
const descObj: any = product.description ? { th: product.description } : {};
|
||||
const detailsObj: any = product.details ? { th: product.details } : {};
|
||||
product.translations.forEach((t: any) => {
|
||||
nameObj[t.langCode] = t.name;
|
||||
descObj[t.langCode] = t.description;
|
||||
|
||||
Reference in new issue
Block a user