From f801f8f422954b884a6541321dba0669ee9d6173 Mon Sep 17 00:00:00 2001 From: Factiven Date: Sun, 22 Oct 2023 19:43:17 +0700 Subject: Update v4.2.0 (#93) --- pages/admin/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pages/admin') diff --git a/pages/admin/index.js b/pages/admin/index.js index cbb5086..2a73fc1 100644 --- a/pages/admin/index.js +++ b/pages/admin/index.js @@ -27,7 +27,12 @@ export async function getServerSideProps(context) { } const admin = sessions?.user?.name === process.env.ADMIN_USERNAME; - const api = process.env.API_URI; + + let api; + api = process.env.API_URI; + if (api.endsWith("/")) { + api = api.slice(0, -1); + } if (!admin) { return { -- cgit v1.2.3