Hi all, my site, let’s say is a website where you go on and look at kittens, and right now, when you go on and look at a kitten, you can mark that kitten as complete, so you dont click on that kitten again to look at it, currently this is stored in the local browser session, so that when you return on this browser, the site can mark off your previously viewed kittens as complete.
Now im moving forward with it, I have accounts/registration in place, and its time for me to think about adding your kitten history to your user profile, so naturally wherever you log in, your kittens are in sync!
Heres the question though, im not doing anything fancy like related content (might be the wrong name, ive forgotten), I am just storing the ID’s of the kittens in the browser, that you have viewed, super simple, I thought, lets just take that JSON string I was storing in the browser, and if your logged in, copy that string into your user profile on Strapi, do some conflict checking etc, and there, done.
However, the developer I sometimes work with on this project thinks this is wrong, and that we should store the users who have viewed each kitten, against the kitten in question, so ‘Small Brown Kitten’ would have a field that stores some sort of array of user ID’s etc, and then when the front end loads ‘Small Brown Kitten’, if someone is logged in, we check if their username comes up in the array for this kitten.
I personally dont know which is ‘correct’ here, my gut was option 1, but I thought I would put it out to the community, is option 1 even possible OOTB? I assumed I could update a verified user via a similar routing system as the kittens themselves, ie PUT into UserX {newKitten:1012}
for example.
Thanks all!