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
- Attribute Limit Exceeded
Help! I filled in 10 columns in one of my tables and I'm getting this irritating "Attribute Limit Exceeded" error! I even paid to try to make it go away hahaha...
- ERROR Error updating user profile: [App...
Hi guys! I'm a junior react- native dev and I need some help updating data in appetite cloud, my problem is updating profile on parameter updatePassword and all...
- Google Sign in Expo React Native
is there any where I can find clear documentations with examples to integrate Google sign in with my Expo React Native app? All the methods I tried are failing ...