Nameless icon indicating copy to clipboard operation
Nameless copied to clipboard

Punishment Issue

Open intersecato opened this issue 2 years ago • 3 comments

Describe the issue

After banning or warning a user, if you refresh the page it will send another ban/warn punishment.

NamelessMC Version

2.0.0

To Reproduce

  1. Ban/warn a user
  2. Refresh the page

Expected Behaviour

See only one punishment and not a spam of that.

Screenshots

No response

Additional Information

No response

intersecato avatar Aug 18 '22 16:08 intersecato

Is there anything that pop-up when you refresh the page? Something like re-submiting the form?

BaxAndrei avatar Aug 18 '22 16:08 BaxAndrei

Nothing, just another punishment which is added to the list, and obv also to the db, so is not a visual bug.

intersecato avatar Aug 18 '22 16:08 intersecato

This is likely because the data returned is a result of a POST request. When refreshing the page, the browser will make an identical POST request. Your browser should prompt you with a warning when doing this.

Instead of immediately returning a page, we could return a redirect.

Derkades avatar Aug 18 '22 17:08 Derkades