Files
RSSHub/lib/routes/discourse/utils.ts
T
2024-03-04 00:35:37 +08:00

14 lines
384 B
TypeScript

// @ts-nocheck
import { config } from '@/config';
function getConfig(ctx) {
if (!config.discourse.config[ctx.req.param('configId')]) {
throw new Error('Discourse RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install">relevant config</a>');
}
return config.discourse.config[ctx.req.param('configId')];
}
module.exports = {
getConfig,
};