Can delete a device relay from UI

This commit is contained in:
2024-08-31 20:03:46 +02:00
parent f35aac04f6
commit b0023a5167
5 changed files with 107 additions and 25 deletions

View File

@ -39,4 +39,14 @@ export class RelayApi {
jsonData: relay,
});
}
/**
* Delete a relay configuration
*/
static async Delete(relay: DeviceRelay): Promise<void> {
await APIClient.exec({
method: "DELETE",
uri: `/relay/${relay.id}`,
});
}
}