
Im creating a site where people can post, but there are some attributes like likes that i dont want people to see

You can use Query.select(attribute)
to select only the attributes you want, but this doesn't stop anyone from altering the request to get everything. Other than that you can create a cloud function that you call via rest, that does the fetching and returns only exactly what you want

Yeah i checked a video about the functions but i couldnt really get to anywhere with it

What issues are you having?

You should be able to use the starter template to get something put together pretty quickly
import { Client, Users } from 'node-appwrite';
export default async ({ req, res, log, error }) => {
const client = new Client()
.setEndpoint(process.env.APPWRITE_FUNCTION_API_ENDPOINT)
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
.setKey(process.env.APPWRITE_FUNCTION_API_KEY);
const database = new Databases(client);
const { documents } = await database.listDocuments(DATABASE_ID, COLLECTION_ID);
return res.json({
attribute: documents.attribute,
attribute: documents.attribute,
attribute: documents.attribute
});
};
Recommended threads
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
- Website shows just the HTML in safari
Hi y'all, I've been working on a project for a while but, for some reason it just shows the html in safari, It work perfectly fine in firefox and chrome, but sa...
