fix(route): showstart search (#16488)

* fix(route): showstart search

* fix(route): showstart search - early return and allowempty
This commit is contained in:
xxx.Yan
2024-08-21 10:57:00 +08:00
committed by GitHub
parent c73192dda8
commit 3d342c9f66
+33 -1
View File
@@ -7,7 +7,38 @@ export const route: Route = {
path: '/search/:type/:keyword?',
categories: ['shopping'],
example: '/showstart/search/live',
parameters: { type: '类别', keyword: '搜索关键词' },
parameters: {
keyword: '搜索关键词',
type: {
description: '类别',
options: [
{
value: 'event',
label: '演出',
},
{
value: 'artist',
label: '音乐人',
},
{
value: 'site',
label: '场地',
},
{
value: 'brand',
label: '厂牌',
},
{
value: 'city',
label: '城市',
},
{
value: 'style',
label: '风格',
},
],
},
},
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -66,6 +97,7 @@ async function handler(ctx: Context): Promise<Data> {
return {
title: `${TITLE} - 搜演出 - ${type || '全部'}`,
link: HOST,
allowEmpty: true,
item: await fetchActivityList({ keyword: type }),
};
}