Mar1789 / Mentorship-Capstone-Project

0 stars 0 forks source link

Delete post like #9

Open jialic2 opened 4 days ago

jialic2 commented 4 days ago

https://github.com/Mar1789/Mentorship-Capstone-Project/blob/c5f88f3f5a47d2d5c5aab9f90478e50b5b582bae/Back-end/index.js#L41-L43

I wonder if there ever is the case where count > 1?

Mar1789 commented 4 days ago

It would not be possible since my code checks if a like exists in the database. Starting on line 45, a user cannot like a post if they already did so before (so when it is already in the database).