fix(route/joneslanglasalle): radix to 10 and set default to 12

This commit is contained in:
pseudoyu
2024-12-06 07:54:20 +08:00
parent d7447b25cf
commit db18c561cb
+1 -1
View File
@@ -36,7 +36,7 @@ const cleanHtml = (html: string, preservedTags: string[]): string => {
export const handler = async (ctx: Context): Promise<Data> => {
const { language: lang = 'zh', category = 'trends-and-insights' } = ctx.req.param();
// default limit is 12
const limit: number = Number.parseInt(ctx.req.query('limit') ?? '11', 11);
const limit: number = Number.parseInt(ctx.req.query('limit') ?? '12', 10);
const rootUrl: string = 'https://www.joneslanglasalle.com.cn';
const targetUrl: string = new URL(`${lang}/${category}`, rootUrl).href;