Add select for relays
This commit is contained in:
16
central_frontend/src/api/RelayApi.ts
Normal file
16
central_frontend/src/api/RelayApi.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { APIClient } from "./ApiClient";
|
||||
import { DeviceRelay } from "./DeviceApi";
|
||||
|
||||
export class RelayApi {
|
||||
/**
|
||||
* Get the full list of relays
|
||||
*/
|
||||
static async GetList(): Promise<DeviceRelay[]> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
method: "GET",
|
||||
uri: "/relays/list",
|
||||
})
|
||||
).data;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user