1
0
Fork 0
forked from Kispi/Core

fix(webapp): anonymous session not working

This commit is contained in:
Simon Giesel 2022-07-30 23:13:03 +02:00
parent 64f7c7393f
commit 971b760792

View file

@ -3,16 +3,14 @@ import { Client, Account } from 'appwrite';
const sdk = new Client();
sdk
.setEndpoint('http://192.168.178.88/v1')
.setEndpoint('http://192.168.1.104/v1')
.setProject('62dfc94a1637dc23acbc');
export const AppwriteService = {
getSDK(): Client {
// TODO Authenticate
const account = new Account(sdk);
if(!account.getSession('current')) {
account.createAnonymousSession();
}
return sdk;
},
};