lets try that again
This commit is contained in:
parent
67eb5075d4
commit
135e5fd0af
1 changed files with 13 additions and 9 deletions
|
|
@ -1,14 +1,18 @@
|
||||||
// js/accounts/config.js
|
|
||||||
import { Client, Account } from 'appwrite';
|
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);
|
const account = new Account(client);
|
||||||
|
|
||||||
export { client, account as auth };
|
export { client, account as auth };
|
||||||
export const saveFirebaseConfig = () => {
|
export const saveFirebaseConfig = () => { console.log("ill fix this tomorrow"); };
|
||||||
console.log('ill fix this tomorrow');
|
export const clearFirebaseConfig = () => { console.log("ill fix this tomorrow"); };
|
||||||
};
|
|
||||||
export const clearFirebaseConfig = () => {
|
|
||||||
console.log('ill fix this tomorrow');
|
|
||||||
};
|
|
||||||
Loading…
Reference in a new issue