From 7be2b162156324e0b84dfdc2ff0f626a61bd8b81 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 14 Jul 2023 18:38:53 -0700 Subject: [PATCH] remove trailing slash --- .../backend/src/server/api/endpoints/admin/update-meta.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index ce2c5c802f..d11e6b9643 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -224,10 +224,9 @@ export default define(meta, paramDef, async (ps, me) => { if (set.recommendedInstances?.length > 0) { set.recommendedInstances.forEach((instance, index) => { if (/^https?:\/\//i.test(instance)) { - set.recommendedInstances![index] = instance.replace( - /^https?:\/\//i, - "", - ); + set.recommendedInstances![index] = instance + .replace(/^https?:\/\//i, "") + .replace(/\/$/, ""); } }); }