Files
RSSHub/lib/v2/showstart/event.js
T
lchtao26 be74209c6c feat(route/秀动网): add more routes (#13884)
* 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
2023-11-26 20:12:52 +00:00

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,
};
};