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
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...