From e7fb4e8fd0cbf4aa3e3fc68f7d7b1ce74a41e3c2 Mon Sep 17 00:00:00 2001 From: Jia Chen Date: Fri, 22 Mar 2024 12:09:14 +0800 Subject: [PATCH] fix(route): fix 36kr route & kaopu.news doc desc (#14884) * fix(route): fix 36kr route & kaopu.news doc desc * chore(route): Update lib/routes/36kr/index.ts --------- --- lib/routes/36kr/index.ts | 13 +++++++++++-- lib/routes/kaopu/news.ts | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/routes/36kr/index.ts b/lib/routes/36kr/index.ts index dd2740243..4b9bc9823 100644 --- a/lib/routes/36kr/index.ts +++ b/lib/routes/36kr/index.ts @@ -17,10 +17,19 @@ const shortcuts = { }; export const route: Route = { - path: '/{.*}?', + path: '/:category/:subCategory?/:keyword?', categories: ['new-media'], + example: '/36kr/newsflashes', + parameters: { + category: '分类,必填项', + subCategory: '子分类,选填项,目的是为了兼容老逻辑', + keyword: '关键词,选填项,仅搜索文章/快讯时有效', + }, name: '资讯, 快讯, 用户文章, 主题文章, 专题文章, 搜索文章, 搜索快讯', - maintainers: ['nczitzk'], + maintainers: ['nczitzk', 'fashioncj'], + description: `| 最新资讯频道 | 快讯 | 推荐资讯|生活|房产|职场|搜索文章|搜索快讯| + | ------- | -------- | -------- | -------- | -------- | --------| -------- | -------- | + | news | newsflashes | recommend | life | estate | workplace | search/articles/关键词 | search/articles/关键词 |`, handler, }; diff --git a/lib/routes/kaopu/news.ts b/lib/routes/kaopu/news.ts index c81b69bf5..c7b6e9aac 100644 --- a/lib/routes/kaopu/news.ts +++ b/lib/routes/kaopu/news.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/news/:language?', categories: ['new-media'], - example: '/news/zh-hans, /news/zh-hant', + example: '/news/zh-hans', parameters: { language: '语言', },