From c3e07c16077d5a1e49ecb419ec2f78051e4c306f Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sun, 2 Apr 2023 00:02:22 +0300 Subject: [PATCH] fix: error on dashboard plugin usage page --- backend/src/api/docs.ts | 7 ++++--- dashboard/src/components/docs/Plugin.vue | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/backend/src/api/docs.ts b/backend/src/api/docs.ts index e2dd63a8..dcb75c49 100644 --- a/backend/src/api/docs.ts +++ b/backend/src/api/docs.ts @@ -54,9 +54,10 @@ export function initDocs(app: express.Express) { } const name = plugin.name; - const info = plugin.info || {}; + const info = { ...(plugin.info || {}) }; + delete info.configSchema; - const commands = (plugin.messageCommands || []).map((cmd) => ({ + const messageCommands = (plugin.messageCommands || []).map((cmd) => ({ trigger: cmd.trigger, permission: cmd.permission, signature: cmd.signature, @@ -73,7 +74,7 @@ export function initDocs(app: express.Express) { info, configSchema, defaultOptions, - commands, + messageCommands, }); }); } diff --git a/dashboard/src/components/docs/Plugin.vue b/dashboard/src/components/docs/Plugin.vue index ab88c46b..bbddc260 100644 --- a/dashboard/src/components/docs/Plugin.vue +++ b/dashboard/src/components/docs/Plugin.vue @@ -46,9 +46,9 @@ -
-

Message Commands

-
+

Message commands

+