Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 committed Nov 13, 2024
1 parent 1f65512 commit d6f4666
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/providers/template/src/pages/api/listTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const readTemplates = (
if (!language) return true;

if (!item.spec.locale) return true;
console.log(item.spec.locale === language || (item.spec.i18n && item.spec.i18n[language]));

if (item.spec.locale === language || (item.spec.i18n && item.spec.i18n[language]))
return true;

Expand Down Expand Up @@ -90,7 +90,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
}

const templates = readTemplates(jsonPath, cdnUrl, blacklistedCategories, language);
console.log(language, templates.length);

const timestamp = new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' });
console.log(`[${timestamp}] language: ${language}, templates count: ${templates.length}`);

const categories = templates.map((item) => (item.spec?.categories ? item.spec.categories : []));
const topKeys = findTopKeyWords(categories, menuCount);
Expand Down

0 comments on commit d6f4666

Please sign in to comment.