diff options
| author | Factiven <[email protected]> | 2023-10-24 20:27:32 +0700 |
|---|---|---|
| committer | Factiven <[email protected]> | 2023-10-24 20:27:32 +0700 |
| commit | 451e4dffd000169e7113aa3275e4acaf7f1fbbbc (patch) | |
| tree | 035edf0d05e2f6878be745c326935aba3d821636 /pages/admin | |
| parent | Update v4.2.1 (diff) | |
| download | moopa-4.2.2.tar.xz moopa-4.2.2.zip | |
Update v4.2.2v4.2.2
Diffstat (limited to 'pages/admin')
| -rw-r--r-- | pages/admin/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/admin/index.js b/pages/admin/index.js index 2a73fc1..6cb9a76 100644 --- a/pages/admin/index.js +++ b/pages/admin/index.js @@ -29,8 +29,8 @@ export async function getServerSideProps(context) { const admin = sessions?.user?.name === process.env.ADMIN_USERNAME; let api; - api = process.env.API_URI; - if (api.endsWith("/")) { + api = process.env.API_URI || null; + if (api && api.endsWith("/")) { api = api.slice(0, -1); } |