Hi there !
I'm trying to access a specific Document in a specific Collection within a Function.
But the Function keeps crashing telling me the Document with the requested ID could not be found
I'm sure the document exist and the collection ID (and DB ID) are good.
The thing is, there is no permission on the Collection as I want this collection to be only accessible with the admin rights of the Funciton (no user can access it).
Here is the code I used
const adminClient = new Client()
.setEndpoint(Bun.env['APPWRITE_FUNCTION_API_ENDPOINT'] as string)
.setProject(Bun.env['APPWRITE_FUNCTION_PROJECT_ID'] as string)
.setKey(Bun.env['x-appwrite-key'] as string);
const adminDatabase = new Databases(adminClient);
const prompt = await adminDatabase.getDocument(
DB,
PROMPTS,
documentID,
[Query.select(['content'])]
);
Again, I am sure that documentID exists in PROMPTS...
Is there a specific permission to add in this case ? I'm a bit lost in this.
Recommended threads
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...
- Create a new paid tier
Current pricing seems reasonable enough about what is someone getting for 25$. But for some people most of these resouces are getting wasted. Like the bandwidt...
- [Bug] Appwrite Auth User Prefs
User prefs are decoded as blank although there are plenty of data and add preference button not working in this case