From f193dfbddcba4df20612e5aa003ccfb3b63c92be Mon Sep 17 00:00:00 2001 From: Tony Date: Sun, 26 Jan 2025 22:50:40 +0800 Subject: [PATCH] refactor: rename ctx for consistency --- lib/routes/catti/news.ts | 4 ++-- lib/routes/cpta/handler.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/catti/news.ts b/lib/routes/catti/news.ts index a62cfcc054..8d926c5141 100644 --- a/lib/routes/catti/news.ts +++ b/lib/routes/catti/news.ts @@ -24,8 +24,8 @@ const NEWS_TYPES: Record = { }, }; -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}`; diff --git a/lib/routes/cpta/handler.ts b/lib/routes/cpta/handler.ts index d8d40510a2..d5f34af89a 100644 --- a/lib/routes/cpta/handler.ts +++ b/lib/routes/cpta/handler.ts @@ -25,8 +25,8 @@ const NEWS_TYPES: Record = { }, }; -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);