
I'm experiencing an issue with updating user data in my application. After performing a profile update, such as name, email, or phone number, the data returned by the database still shows the old information, even after you try to fetch it again with getCurrentUser
// Get Current User export async function getCurrentUser() { try { const currentAccount = await account.get(); if (!currentAccount) throw Error;
const currentUser = await databases.listDocuments(
appwriteConfig.databaseId,
appwriteConfig.userCollectionId,
[Query.equal("accountId", currentAccount.$id)]
);
if (!currentUser) throw Error;
return currentUser.documents[0];
} catch (error) { console.log(error); return null; } }

Did the data changed in the appwrite cloud?

Yes

IMO if the data has updated in Appwrite, but not in your app, then you're app is caching the request in some form.
Recommended threads
- Realtime Disconnects and Error: INVALID_...
Hi! I just want to ask here if there's any workaround with the disconnect issues we're encountering when subscribing to realtime events in react native using ex...
- Sites
So I developed an app using react native and using the cloud services offered by appwrite. Everything is set up but if I want to publish this website to the web...
- updatePassword invalid credentials error...
This is my code: ```js const result = await account.updatePassword( newPassword ); ``` This is my error: ``` [AppwriteException: Invalid cr...
