Skip to content

Commit 51d1b15

Browse files
Make sure we wait for the start/stop to start.
1 parent 1e87091 commit 51d1b15

File tree

1 file changed

+2
-2
lines changed
  • src/reachy_mini/daemon/app/dashboard/static/js

1 file changed

+2
-2
lines changed

src/reachy_mini/daemon/app/dashboard/static/js/daemon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const daemon = {
55
currentStatus: {},
66

77
start: async (wakeUp) => {
8-
fetch(`/api/daemon/start?wake_up=${wakeUp}`, {
8+
await fetch(`/api/daemon/start?wake_up=${wakeUp}`, {
99
method: 'POST',
1010
})
1111
.then((response) => {
@@ -23,7 +23,7 @@ const daemon = {
2323
},
2424

2525
stop: async (gotoSleep) => {
26-
fetch(`/api/daemon/stop?goto_sleep=${gotoSleep}`, {
26+
await fetch(`/api/daemon/stop?goto_sleep=${gotoSleep}`, {
2727
method: 'POST',
2828
})
2929
.then((response) => {

0 commit comments

Comments
 (0)