kelvinfan001 / findalicious

Swipe through restaurants with friends and decide on where to eat! (Formerly Chicken Tinder)
https://findalicious.herokuapp.com
GNU General Public License v3.0
5 stars 1 forks source link

Only allow room creator to press "Everyone is in" #80

Closed kelvinfan001 closed 3 years ago

kelvinfan001 commented 4 years ago

To prevent accidental starts.

avatarneil commented 3 years ago

I'm wondering what the best way to designate the "creator" would be... The cleanest approach IMO would be to have a creatorId on the mongo room which corresponds with the socket's ID, but we could also just check upon receiving the initiate swiping event to see if the socket ID is the first one in the participants list (assuming mongo lists are ordered). In addition to either of those approaches, we probably want to make the FE also aware that a given user isn't the creator, but that ought to be fairly easy.

kelvinfan001 commented 3 years ago

The first option SGTM! Definitely sounds a lot cleaner than the second approach, we could potentially make use of that creatorId some time in the future, so really don't think it'd hurt to have it.