Dashactyl icon indicating copy to clipboard operation
Dashactyl copied to clipboard

Issue with server managing logic dashboard

Open Wepwawetcode opened this issue 2 years ago • 2 comments

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">

Wepwawetcode avatar Apr 09 '22 23:04 Wepwawetcode

This doesn’t actually explain what the bug is, also your fix (if applicable) would be better as a PR.

devnote-dev avatar Apr 09 '22 23:04 devnote-dev

It sends the wrong id to the backend and this causes the wrong server to be deleted.

Wepwawetcode avatar Apr 10 '22 01:04 Wepwawetcode