From 135e5fd0afd388889d1b362b99c9268be7963cf4 Mon Sep 17 00:00:00 2001 From: Samidy Date: Sat, 7 Mar 2026 02:57:28 +0300 Subject: [PATCH] lets try that again --- js/accounts/config.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/js/accounts/config.js b/js/accounts/config.js index cc19d85..c4bf42a 100644 --- a/js/accounts/config.js +++ b/js/accounts/config.js @@ -1,14 +1,18 @@ -// js/accounts/config.js import { Client, Account } from 'appwrite'; -const client = new Client().setEndpoint('https://auth.samidy.xyz/v1').setProject('auth-for-monochrome'); +const getEndpoint = () => { + const hostname = window.location.hostname; + if (hostname.endsWith('monochrome.tf') || hostname === 'monochrome.tf') { + return 'https://auth.monochrome.tf/v1'; + } + return 'https://auth.samidy.com/v1'; +}; + +const client = new Client() + .setEndpoint(getEndpoint()) + .setProject('auth-for-monochrome'); const account = new Account(client); - export { client, account as auth }; -export const saveFirebaseConfig = () => { - console.log('ill fix this tomorrow'); -}; -export const clearFirebaseConfig = () => { - console.log('ill fix this tomorrow'); -}; +export const saveFirebaseConfig = () => { console.log("ill fix this tomorrow"); }; +export const clearFirebaseConfig = () => { console.log("ill fix this tomorrow"); }; \ No newline at end of file