mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Fix(?) error on docs caused by union type mismatch
This commit is contained in:
parent
63efaf84ee
commit
0f226bfa93
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@ import { guildPlugins } from "../plugins/availablePlugins";
|
||||||
import { notFound } from "./responses";
|
import { notFound } from "./responses";
|
||||||
import { indentLines } from "../utils";
|
import { indentLines } from "../utils";
|
||||||
import { getPluginName } from "knub/dist/plugins/pluginUtils";
|
import { getPluginName } from "knub/dist/plugins/pluginUtils";
|
||||||
|
import { ZeppelinPluginBlueprint } from "src/plugins/ZeppelinPluginBlueprint";
|
||||||
|
|
||||||
function formatConfigSchema(schema) {
|
function formatConfigSchema(schema) {
|
||||||
if (schema._tag === "InterfaceType" || schema._tag === "PartialType") {
|
if (schema._tag === "InterfaceType" || schema._tag === "PartialType") {
|
||||||
|
@ -46,7 +47,9 @@ export function initDocs(app: express.Express) {
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/docs/plugins/:pluginName", (req: express.Request, res: express.Response) => {
|
app.get("/docs/plugins/:pluginName", (req: express.Request, res: express.Response) => {
|
||||||
const plugin = docsPlugins.find(obj => getPluginName(obj) === req.params.pluginName);
|
const plugin = docsPlugins.find(obj => getPluginName(obj) === req.params.pluginName) as ZeppelinPluginBlueprint<
|
||||||
|
any
|
||||||
|
>;
|
||||||
if (!plugin) {
|
if (!plugin) {
|
||||||
return notFound(res);
|
return notFound(res);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue