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
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- Custom Domains
Hi All, Should be a quick config issue. I'm setting up custom domains on the hosted version. I have verified the domain with the CNAME but appwrite isn't gene...