Validate devices
This commit is contained in:
@ -33,6 +33,15 @@ pub struct DeviceInPath {
|
||||
id: DeviceId,
|
||||
}
|
||||
|
||||
/// Validate a device
|
||||
pub async fn validate_device(actor: WebEnergyActor, id: web::Path<DeviceInPath>) -> HttpResult {
|
||||
actor
|
||||
.send(energy_actor::ValidateDevice(id.id.clone()))
|
||||
.await??;
|
||||
|
||||
Ok(HttpResponse::Accepted().finish())
|
||||
}
|
||||
|
||||
/// Delete a device
|
||||
pub async fn delete_device(actor: WebEnergyActor, id: web::Path<DeviceInPath>) -> HttpResult {
|
||||
actor
|
||||
|
Reference in New Issue
Block a user