aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Utility/root.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Utility/root.ts')
-rw-r--r--src/lib/Utility/root.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/Utility/root.ts b/src/lib/Utility/root.ts
index bf8bb11f..a69755e5 100644
--- a/src/lib/Utility/root.ts
+++ b/src/lib/Utility/root.ts
@@ -1,8 +1,6 @@
-import { env } from "$env/dynamic/public";
+import { appOrigin, LOCAL_ORIGIN } from "$lib/Utility/appOrigin";
export const root = (path: string, enable = false) =>
- env.PUBLIC_ANILIST_REDIRECT_URI?.includes("localhost") || enable
- ? `http://localhost:5173${path}`
- : `https://due.moe${path}`;
+ `${enable ? LOCAL_ORIGIN : appOrigin()}${path}`;
export default root;