Nice
Is there an updated guide on setting up Appwrite for the latest version?
Sure It's very easy
I am still new to Firebase/Appwrite format and the documentation isn't that clear tbh
in terms of what indexes do, functions, etc. vs a traditional database
Yes.. sometime it's difficult to find the right one
so what permissions do I need to set?
It can be more complex at the beginning from my POV it worth it
For what part? I don't think you need in your use case
What would be better is that you transfer the CheckMemberStatus part of creating the document to a function
And block all writing to the collection.
But that's for later
I added the role Users with permissions create read write update delete
it still is giving me an error
You still get the 500?
no but still
Logging in... users.ts:48:16
Logging in...
Account: [object Object] users.ts:52:20
Logging in...
Account: [object Object] users.ts:52:20
AccountPage mounted AccountPage.vue:107:10
Something went wrong: Not connected
BTW: When I used Appwrite + Vue + Pinia, I've stored the user in a global manual state not in Pinia, I don't remember why, but back in the time it's seems simpler to me
For your case try to extract the CheckMemberStatus function and test it on it's own.
One last idea
Where you actually store this item?
const isConnectedStorage = localStorage.getItem("isConnected");
What I mean how do you make the value of the isConnected computer property true?
async function CheckConnection() {
if (account.value == null) {
isConnected.value = false;
}
try {
const session = await account.value.get();
if (session) {
isConnected.value = true;
accountInfo.value = session;
localStorage.setItem("isConnected", JSON.stringify(accountInfo.value));
}
} catch (error) {
console.log("Not connected");
isConnected.value = false;
}
}
Hey, so the CheckConnection is supposed to be called once first in the main.js file of your app if I remember well π€
No my bad it's in App.vue
you can check the example here : https://github.com/Heargo/ressources-panel/blob/main/src/App.vue
As it's code I've written there is no documentation on it haha so don't hesitate to ping me if you need help
@Hearstgo quick question, I've been using your code but when exactly do you set the localStorage item for isConnected or AutoSave? in store?
very good question haha ! If I remember well, I didn't clean up the code properly π since appwrite already using localstorage I only need to init the variables with the checkConnection() when starting the app and then after an attempt to log
You can replace
IsConnected:JSON.parse(localStorage.getItem('isConnected')) || false, autoSave:JSON.parse(localStorage.getItem('autoSave')) || false,
by this and it should still work
IsConnected:false,
autoSave: false,
gotcha! π
Recommended threads
- Problem with Google Workspace at DNS Rec...
Hello, I bought a domain at Namecheap, and Google Workspace used to work there, but now that I switched from Custom DNS to Appwrite's nameservers, it doesn't w...
- change role of a team member in Appwrite
It's not possible to add/change roles of a team meber in Appwrite Frontend. When you click on a member of a team you get forwarded to the configuration page of ...
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, itβs mention that only setup client with endpoint / api key is enou...