fix(front-end): adjust logic to perform set action and change prop name sent to the back-end
This commit is contained in:
parent
bf8a323c50
commit
a1163916ab
@ -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',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user