forked from Kispi/Core
fix(webapp): anonymous session not working
This commit is contained in:
parent
64f7c7393f
commit
971b760792
1 changed files with 2 additions and 4 deletions
|
@ -3,16 +3,14 @@ import { Client, Account } from 'appwrite';
|
||||||
const sdk = new Client();
|
const sdk = new Client();
|
||||||
|
|
||||||
sdk
|
sdk
|
||||||
.setEndpoint('http://192.168.178.88/v1')
|
.setEndpoint('http://192.168.1.104/v1')
|
||||||
.setProject('62dfc94a1637dc23acbc');
|
.setProject('62dfc94a1637dc23acbc');
|
||||||
|
|
||||||
export const AppwriteService = {
|
export const AppwriteService = {
|
||||||
getSDK(): Client {
|
getSDK(): Client {
|
||||||
// TODO Authenticate
|
// TODO Authenticate
|
||||||
const account = new Account(sdk);
|
const account = new Account(sdk);
|
||||||
if(!account.getSession('current')) {
|
|
||||||
account.createAnonymousSession();
|
account.createAnonymousSession();
|
||||||
}
|
|
||||||
return sdk;
|
return sdk;
|
||||||
},
|
},
|
||||||
};
|
};
|
Loading…
Reference in a new issue