
I'm getting the error:
AppwriteException: Invalid query: {"method":"equal","attribute":"accountId","values":["XXXXXXXXXXXXXXX"]}
I believe this is the errant code:
`export async function getAccount() { try { const currentAccount = await account.get();
return currentAccount;
} catch (error) {
console.log(error);
}
}
export async function getCurrentUser() { try { const currentAccount = await getAccount();
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);
}
}`
Thanks in advance for any assistance.
Recommended threads
- How to reduce DB Reads?
I just noticed that I hit the 500k db reads limit on my very small next js app with the most data being present in one collection having around 50 documents. ...
- Getting issue while migrating from Self ...
i try to migrating my project but when do this error come and dont allow to crate that migration
- Fail to receive the verification email a...
I added my email address to prevent it from showing "appwrite," but now I'm not receiving emails for verification or password resets. The function appears to be...
