hey guys, i have this project where user create a post and users can like a post, but now, i cant seem to be able to count the number of likes, it seem like Appwrite did not provide the option to actually count attribute or document
please guys, how do i do this??
For that the best way would be to move the counting up logic into a function
And, if you don't want same user like more than once, then you'll be best creating another collection named likes
with relationship to the each post with unique key composed from user id and post id.
Recommended threads
- Attributes Confusion
```import 'package:appwrite/models.dart'; class OrdersModel { String id, email, name, phone, status, user_id, address; int discount, total, created_at; L...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Edit ID of an existing collection
Hi there. Is it possible to edit an ID of an existing collection? Right now it looks impossible from AppWrite cloud at least.