mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
refactor: rename ctx for consistency
This commit is contained in:
@@ -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}`;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user