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();
|
||||
|
||||
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();
|
||||
}
|
||||
account.createAnonymousSession();
|
||||
return sdk;
|
||||
},
|
||||
};
|
Loading…
Reference in a new issue