
[Query.equal('accountId', currentAccount.$id)]
THis is the query which I am passing in list ```js
async getCurrentUser(){
try {
let currentAccount = await this.account.get()
TypeScript
if(!currentAccount) throw Error
const currentUser = await this.database.listDocuments(
conf.DATABASE_ID,
conf.USER,
[Query.equal('accountId', currentAccount.$id)]
)
if(!currentUser) throw Error
return currentUser.documents[0]
} catch (error) {
console.log(error);
}
}
}``` but getting error as this is not valid
TL;DR
Developers should ensure they are using the correct version of the SDK. For detailed support, share the exact error messages. The issue within the code snippet seems to be with the query construction. Ensure that the `Query` object is correctly imported and used.
Double check you're using the right version of the SDK.
Fyi, it's best to share exact error messages to give people more detail.
Recommended threads
- My collection is not updating after csv ...
- phantom relationships appear on parent c...
i have this bug were my past deleted collection apears as relationship to my parent collection. when i try to delete that relationship from parent it gives me e...
- Attribute stuck on proccessing
i tried creating a new attribute butits stuck on proccessing,i did a hard refresh,cleared cache everything but still stuck on proccessing,also in my functions w...
