Dashactyl
Dashactyl copied to clipboard
Issue with server managing logic dashboard
Bug with deleting servers on the dashboard.
The front end doesn't forward the correct ID to the back-end
It works fine for the style="display: none;" forms if you decide to show them.
So how I fixed this was by changing the following data :
onclick="document.getElementById('three').click()">
to onclick="document.getElementById('<%= server.attributes.id %>').click()">
and <input type="submit" id="three"style="display: none;"value="Delete">
to <input type="submit" id="<%= server.attributes.id %>"style="display: none;"value="Delete">
This doesn’t actually explain what the bug is, also your fix (if applicable) would be better as a PR.
It sends the wrong id to the backend and this causes the wrong server to be deleted.