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
- [AppwriteException: Network request fail...
endpoint https://cloud.appwrite.io/v1 is giving me this error across all of my expo projects right now. Every project was working perfectly fine until last ni...
- [AppwriteException: Network request fail...
I am getting this error whenever I run getAllSchools I have checked the entire project and I have CRUD permissions enabled for any role but I am still getting t...
- Email OTP
Hello! I'm trying to have email verification OTP in my sign-up but i get this error OTP Verification Failed: Account creation failed: AppwriteException: User (r...