Turistforeningen / Verdandi

sjekkut-api (verdandi)
MIT License
1 stars 0 forks source link

/lister/:id/meldav will delete other lists #27

Closed hhartz closed 8 years ago

hhartz commented 8 years ago

If you issue multiple commands to meldav (with the same id), will eventually clear lister entirely

geekus commented 8 years ago

I see that the implementation does not account for trying to leave a list that the user has not joined. Will fix. Testing the relevant code line a little, indicates that it's just the last item that is being removed, and the array is not cleared if containing more than one item.

Have you experienced this behavior with a user that has joined more than one list?

hhartz commented 8 years ago

@geekus yes, discovered it by joining two lists, then double-tapping the leave. Will implement disabling the button while a request is in-flight in the meantime

geekus commented 8 years ago

Or maybe that's what you mean by eventually. By removing the last item enough times, even users with multiple lists will have all of them removed, eventually.

geekus commented 8 years ago

Okay, but I'll fix this. You should not have to account for this bug. 😊

hhartz commented 8 years ago

do fix, but it makes sense to limit the amount of unnecessary traffic in any case ;)

geekus commented 8 years ago

Sure, It's obviously a good practice anyway to have a button disabled (also visually for the user to see) while waiting for a response to a request.