- Strapi Version: 4.1.5
- Operating System: Windows
- Database: sql
- Node Version: v14.19.1
- NPM Version:
- Yarn Version:
I’m currently developing a simple voting plugin/system for strapi and I’m sort of stuck.
The logic is simple - I would like to add a simple voting logic to selected or all of the collection types, where a collection type would receive a simple “vote” endpoint, which would in turn increase the “vote” field/number on the given entry of the collection.
What I’m struggling with is the approach, I can’t decide if the plugin should add a new “votes” field to selected collection scheme/model and an endpoint should In turn simply increase the number via Strapi Query API, OR should the plugin create a new collection on its own, storing all the votes there and somehow referencing them to the appropriate entry in a collection?
I’m sorry if I’m not being clear enough I’d be happy to answer any questions if any arises!
Loving Strapi so far, best find of 2020!