splits-io icon indicating copy to clipboard operation
splits-io copied to clipboard

Let races be deleted

Open glacials opened this issue 3 years ago • 5 comments

Many users get confused about how to remove a race that they don't want polluting their profile because it's a test race etc., we should allow them to be deleted. It needs to be a soft deletion (a deleted_at column) because of the way we use race UUIDs in URLs.

We should be careful not to allow this to be misused to pad someone's profile, e.g. remove all races they performed poorly in.

glacials avatar Dec 06 '20 18:12 glacials

As a compromise for this, any race that starts cannot be deleted? That seems to make it so you can't abuse it while also giving users the impression that they can test something out and still remove the race.

BatedUrGonnaDie avatar Dec 07 '20 01:12 BatedUrGonnaDie

Some of the reports are from races that were started as a test. Maybe any race with >1 non-ghost participant cannot be deleted?

glacials avatar Dec 07 '20 23:12 glacials

I thought you couldn't start races unless there were 2 real entrants?

BatedUrGonnaDie avatar Dec 07 '20 23:12 BatedUrGonnaDie

Nope, ghosts count: https://github.com/glacials/splits-io/blob/main/app/models/race.rb#L96-L119

glacials avatar Dec 08 '20 05:12 glacials

Ah, then I agree if there is >1 non-ghost it shouldn't be delete-able (once started).

BatedUrGonnaDie avatar Dec 08 '20 06:12 BatedUrGonnaDie