chore(control): return request result in power apis

This commit is contained in:
2026-01-06 19:43:13 +01:00
parent f76337efc7
commit 0614746d95
+4 -4
View File
@@ -293,12 +293,12 @@ async function run_shell_command(ip: string, command: string): Promise<RequestRe
return await request_display(ip, '/shellCommand', options); return await request_display(ip, '/shellCommand', options);
} }
export async function shutdown(ip: string): Promise<void> { export async function shutdown(ip: string): Promise<RequestResponse> {
await run_shell_command(ip, 'shutdown -h now'); return await run_shell_command(ip, 'shutdown -h now');
} }
export async function startup(mac: string): Promise<void> { export async function startup(mac: string): Promise<RequestResponse> {
await request_control(`/wakeOnLan`, { return await request_control(`/wakeOnLan`, {
method: 'POST', method: 'POST',
headers: { 'content-type': 'application/json' }, headers: { 'content-type': 'application/json' },
body: JSON.stringify({ mac_address: mac }) body: JSON.stringify({ mac_address: mac })