From c83967042e0203f4f50ff661e6888778e11e6aa4 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Mon, 5 Sep 2022 10:28:09 +0100 Subject: [PATCH] random name in case it is needed --- packages/server/src/api/controllers/plugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index 8ec898d67d..254a008781 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -55,9 +55,11 @@ export async function upload(ctx: any) { } export async function create(ctx: any) { - const { type, source, name, url, headers, githubToken } = ctx.request.body + const { type, source, url, headers, githubToken } = ctx.request.body let metadata let directory + // Generating random name as a backup and needed for url + let name = "PLUGIN_" + Math.floor(100000 + Math.random() * 900000) switch (source) { case "npm":