x
This commit is contained in:
1 parent
cfd642dee0
commit
ae3799d8ce
21 files changed
+172
-30
No files matched your search
@@ -68,7 +68,7 @@ export const productsRoute = new Elysia({ prefix: "/products" })
|
||||
|
||||
const payload = body as any;
|
||||
const results: any[] = [];
|
||||
const LANGS = ['th', 'en', 'ja', 'zh', 'vi', 'ko'];
|
||||
const LANGS = ['th', 'en', 'ja', 'zh', 'vi', 'ko', 'lo', 'it'];
|
||||
|
||||
for (const lang of LANGS) {
|
||||
const name = typeof payload.name === 'string' ? (lang === 'th' ? payload.name : null) : payload.name?.[lang];
|
||||
@@ -925,7 +925,7 @@ export const productsRoute = new Elysia({ prefix: "/products" })
|
||||
// Update translations
|
||||
// If name, description, details are strings, treat as 'th'
|
||||
// If they are objects, iterate over them
|
||||
const languages = ['th', 'en', 'ja', 'zh', 'vi', 'ko'];
|
||||
const languages = ['th', 'en', 'ja', 'zh', 'vi', 'ko', 'lo', 'it'];
|
||||
for (const lang of languages) {
|
||||
const updateData: any = {};
|
||||
let shouldUpdate = false;
|
||||
|
||||
Reference in new issue
Block a user