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
- Rate limit
How do I solve "Signup Failed, Rate limit for the current endpoint has been exceeded. Please try again after some time"? I have Pro and around 2k requests per ...
- Issue with oauth on react native
Hello 😀 I'm building an app with expo react native and I was able to connect to my appwrite project. I can see the tableDB and use basic authentication. I hav...
- API Bandwidth Usage Not Updating
I’ve noticed that the API bandwidth usage in my project dashboard is not updating even after more than 24 hours have passed. Even after multiple API requests, t...