Fix token modal close button resubmitting form

- Change closeTokenModal() to redirect to /api_tokens instead of reload
- Prevents POST resubmission when closing generated token modal
- Avoids 'token name already exists' error on close
parent 345fc8d9
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
function closeTokenModal() { function closeTokenModal() {
document.getElementById('tokenModal').style.display = 'none'; document.getElementById('tokenModal').style.display = 'none';
location.reload(); // Reload the page window.location.href = '/api_tokens'; // Redirect to avoid POST resubmission
} }
function copyTokenFromModal() { function copyTokenFromModal() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment