mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 14:40:23 +08:00
feat(route): Start on support for generic discourse forums. (#13063)
* Start on support for generic discourse forums. * Add doc. * Update doc. * Add exception. * Update doc. * Update bbs.md * test: add discourse config * docs: fix typo * fix: guard condition ---------
This commit is contained in:
@@ -10,6 +10,7 @@ const calculateValue = () => {
|
||||
const email_config = {};
|
||||
const discuz_cookies = {};
|
||||
const medium_cookies = {};
|
||||
const discourse_config = {};
|
||||
|
||||
for (const name in envs) {
|
||||
if (name.startsWith('BILIBILI_COOKIE_')) {
|
||||
@@ -27,6 +28,9 @@ const calculateValue = () => {
|
||||
} else if (name.startsWith('MEDIUM_COOKIE_')) {
|
||||
const username = name.slice(14).toLowerCase();
|
||||
medium_cookies[username] = envs[name];
|
||||
} else if (name.startsWith('DISCOURSE_CONFIG_')) {
|
||||
const id = name.slice('DISCOURSE_CONFIG_'.length);
|
||||
discourse_config[id] = JSON.parse(envs[name]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +140,9 @@ const calculateValue = () => {
|
||||
discord: {
|
||||
authorization: envs.DISCORD_AUTHORIZATION,
|
||||
},
|
||||
discourse: {
|
||||
config: discourse_config,
|
||||
},
|
||||
discuz: {
|
||||
cookies: discuz_cookies,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user