Subterfuge-Revived / Remake-Backend

Server side validation and API
Creative Commons Zero v1.0 Universal
10 stars 1 forks source link

Open room not being deleted after player count drops to 0 #33

Closed pisanovo closed 3 years ago

pisanovo commented 3 years ago

Leaving an open room as the last player will result in an empty room. To avoid cluttering in the game browser, empty rooms should be deleted.

https://github.com/Subterfuge-Revived/Remake-Backend/blob/ea0192bda8bc46604fd5713e8bb20be40b165232/app/Http/Controllers/RoomController.php#L260-L285

griendt commented 3 years ago

I agree!

Although, it would make most sense to me to introduce soft deletes for purposes like this, so that we do have a record in the backend that the room ever existed in the first place. The benefit of Laravel's soft deletes is that you don't need to worry about accidentally querying soft-deleted records (unless you really want to).

QuinnBast commented 3 years ago

Should be resolved with #34