mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 12:21:31 +08:00
10 lines
296 B
JavaScript
10 lines
296 B
JavaScript
module.exports = async (ctx, next) => {
|
|
await next();
|
|
if (ctx.request.path.startsWith('/api/')) {
|
|
return ctx.res.ok({
|
|
message: `request returned ${ctx.body.counter} ${ctx.body.counter > 1 ? 'routes' : 'route'}`,
|
|
data: ctx.body.result,
|
|
});
|
|
}
|
|
};
|