diff options
Diffstat (limited to 'src/lib/Utility/root.ts')
| -rw-r--r-- | src/lib/Utility/root.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/Utility/root.ts b/src/lib/Utility/root.ts new file mode 100644 index 00000000..3f9ea07d --- /dev/null +++ b/src/lib/Utility/root.ts @@ -0,0 +1,8 @@ +import { env } from '$env/dynamic/public'; + +export const root = (path: string, enable = false) => + env.PUBLIC_ANILIST_REDIRECT_URI?.includes('localhost') || enable + ? `http://localhost:5173${path}` + : `https://due.moe${path}`; + +export default root; |