From 7a7de755d132c4835adf9fa177080d5978682fc3 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 ce2c5c802..d11e6b964 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(/\/$/, ""); } }); }