
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
- Creating a relationship with nested obje...
{ "data": { "name": "DiDi", "type": "Software Development", "userJobs": [{ "$id": "68cbf1e2003612fb13ca", "j...
- Realtime integration with SSR auth
Hey, I have a nextjs website with SSR auth, works great. I use a session client for user verification and an admin client with API key. Both is used with node-...
- Adding "name" column to table creates 2-...
As stated, im adding the "name" column to one table, it adds 4 duplicates. In another table it adds 3 duplicates, and when I delete 1 of them, all duplucates di...
