fix(front-end): adjust logic to perform set action and change prop name sent to the back-end

This commit is contained in:
Josue 2021-06-25 16:44:58 -04:00
parent bf8a323c50
commit a1163916ab

View File

@ -141,9 +141,9 @@ const Servers = ({ anvil }: { anvil: AnvilListItem[] }): JSX.Element => {
const handlePower = (label: ButtonLabels) => { const handlePower = (label: ButtonLabels) => {
setAnchorEl(null); setAnchorEl(null);
if (!selected.length) { if (selected.length) {
putJSON('/set_power', { putJSON('/set_power', {
server_uuid: selected, server_uuid_list: selected,
is_on: label === 'on', is_on: label === 'on',
}); });
} }