refactor: rename ctx for consistency

This commit is contained in:
Tony
2025-01-26 22:50:40 +08:00
parent 0793b7a1b7
commit f193dfbddc
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ const NEWS_TYPES: Record<string, NewsCategory> = {
},
};
const handler: Route['handler'] = async (context) => {
const category = context.req.param('category');
const handler: Route['handler'] = async (ctx) => {
const category = ctx.req.param('category');
const BASE_URL = `https://www.catticenter.com/${category}`;
+2 -2
View File
@@ -25,8 +25,8 @@ const NEWS_TYPES: Record<string, NewsCategory> = {
},
};
const handler: Route['handler'] = async (context) => {
const category = context.req.param('category');
const handler: Route['handler'] = async (ctx) => {
const category = ctx.req.param('category');
const BASE_URL = NEWS_TYPES[category].baseUrl;
// Fetch the index page
const { data: listResponse } = await got(BASE_URL);