Can somebody tell me about the general logic how to users only GET the data of their own only.
I'm doing making Rest-API with node.js+express+mysql. I already created CRUD operation with simple authentication. But I still vague about the logic, how the rest-api knows about the id of users that already login in app.
Please tell me the logic in GET but only the users already login can see their own data.
- Users = id(pk), name(varchar)
- data = id(pk), users_id(fk), description (varchar)
users can have multiple data. Thanks a lot