mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-21 12:49:53 +08:00
feat: unclean routes export
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
const { ProcessFeed } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => ctx.set('data', await ProcessFeed('all', 0, ctx.req.param('order')));
|
||||
export default async (ctx) => ctx.set('data', await ProcessFeed('all', 0, ctx.req.param('order')));
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
const { ProcessFeed } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => ctx.set('data', await ProcessFeed('character', ctx.req.param('id'), ctx.req.param('order')));
|
||||
export default async (ctx) => ctx.set('data', await ProcessFeed('character', ctx.req.param('id'), ctx.req.param('order')));
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
const { ProcessFeed } = require('./utils');
|
||||
|
||||
module.exports = async (ctx) => ctx.set('data', await ProcessFeed('work', ctx.req.param('id'), ctx.req.param('order')));
|
||||
export default async (ctx) => ctx.set('data', await ProcessFeed('work', ctx.req.param('id'), ctx.req.param('order')));
|
||||
|
||||
@@ -53,7 +53,7 @@ const mediaTagDict = {
|
||||
export default async (ctx) => {
|
||||
const useWeb = ctx.req.param('routeParams') || !(config.telegram.session && config.feature.mediaProxyKey);
|
||||
if (!useWeb) {
|
||||
return require('./tglib/channel')(ctx);
|
||||
return require('./tglib/channel').default(ctx);
|
||||
}
|
||||
|
||||
const username = ctx.req.param('username');
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
const webApiImpl = require('./web-api/search');
|
||||
|
||||
module.exports = async (ctx) => await webApiImpl(ctx);
|
||||
export default async (ctx) => await webApiImpl(ctx);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
const webApiImpl = require('./web-api/media');
|
||||
|
||||
module.exports = async (ctx) => await webApiImpl(ctx);
|
||||
export default async (ctx) => await webApiImpl(ctx);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
const webApiImpl = require('./web-api/user');
|
||||
|
||||
module.exports = (ctx) => webApiImpl(ctx);
|
||||
export default (ctx) => webApiImpl(ctx);
|
||||
|
||||
Reference in New Issue
Block a user