Merge branch 'master' of github.com:DIYgod/RSSHub

This commit is contained in:
NeverBehave
2021-09-22 05:44:12 -07:00
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -96,13 +96,13 @@ RSSHub 同时支持 RSS 2.0 和 Atom 输出格式,在路由末尾添加 `.rss`
### debug
在路由末尾添加 `.debug.json`且实例运行在`debugInfo=true`的情况下,RSShub将会返回插件设置在`ctx.state.json`的内容
在路由末尾添加 `.debug.json`且实例运行在`debugInfo=true`的情况下,RSShub 将会返回插件设置在`ctx.state.json`的内容
这功能皆在方便开发者调试问题,方便用户自行开发需要的功能。插件作者可以酌情考虑使用,没有格式要求。
举例:
- `/furstar/characters/cn.debug.json`
- `/furstar/characters/cn.debug.json`
## 输出简讯
+1 -1
View File
@@ -20,7 +20,7 @@ module.exports = async (ctx, next) => {
if (ctx.state.json) {
ctx.body = JSON.stringify(ctx.state.json, null, 4);
} else {
ctx.body = JSON.stringify({ message: "plugin does not set json" });
ctx.body = JSON.stringify({ message: 'plugin does not set json' });
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ module.exports = async (ctx) => {
const details = await Promise.all(info.map((e) => utils.detailPage(e.detailPage, ctx.cache)));
ctx.state.json = {
info
info,
};
ctx.state.data = {