mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-24 23:42:40 +08:00
feat: esm standard for routes
This commit is contained in:
@@ -16,7 +16,7 @@ const titleMap = {
|
||||
application: '应用',
|
||||
};
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
export default async (ctx) => {
|
||||
const channel = ctx.req.param('channel') ?? 'latest';
|
||||
const url = rootUrl;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ const titleMap = {
|
||||
public_blockchain: '公链',
|
||||
};
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
export default async (ctx) => {
|
||||
const channel = ctx.req.param('channel') ?? 'latest';
|
||||
const url = `${rootUrl}/kepu.html`;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import timezone from '@/utils/timezone';
|
||||
|
||||
const rootUrl = 'https://www.hellobtc.com';
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
export default async (ctx) => {
|
||||
const url = `${rootUrl}/news`;
|
||||
|
||||
const response = await got(url);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports = function (router) {
|
||||
export default (router) => {
|
||||
router.get('/information/:channel?', './information');
|
||||
router.get('/news', './news');
|
||||
router.get('/kepu/:channel?', './kepu');
|
||||
|
||||
Reference in New Issue
Block a user