
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
- Sites 30MB limit from GitHub
I’m deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it’s in a subdirectory with the root being an html landin...
- [bug] API response is good but UI don't ...
Hi guys! When i got my object, it have billingInfo relation, in the web ui i just got pading state, and the row shows object is null, but when i work whit this...
- Query params are way too limiting in ter...
I was trying to list rows in a table that do not already exist in another table. I retrieved around 260 row IDs which are 13 characters in length each, and then...
