mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
* feat(route): add artist route * feat(route): add brand route * chore: merge '/params' route into '/search' route * chore: fix and clean code * chore: sort new entries in alphabetical order. * chore: add new routes in maintainer * chore: sort maintain entries in alphabetical order. * fix: fix event route
19 lines
616 B
JavaScript
19 lines
616 B
JavaScript
const { TITLE, HOST } = require('./const');
|
|
const { fetchActivityList, fetchDictionary } = require('./service');
|
|
|
|
module.exports = async (ctx) => {
|
|
const cityCode = parseInt(ctx.params.cityCode);
|
|
const showStyle = parseInt(ctx.params.showStyle);
|
|
const items = await fetchActivityList({
|
|
cityCode,
|
|
showStyle,
|
|
});
|
|
const { cityName, showName } = await fetchDictionary(cityCode, showStyle);
|
|
const tags = [cityName, showName].filter((item) => Boolean(item)).join(' - ');
|
|
ctx.state.data = {
|
|
title: `${TITLE} - ${tags}`,
|
|
link: HOST,
|
|
item: items,
|
|
};
|
|
};
|