Can get the full list of relays through the API
This commit is contained in:
central_backend/src
@ -107,10 +107,12 @@ pub async fn secure_server(energy_actor: EnergyActorAddr) -> anyhow::Result<()>
|
||||
}))
|
||||
.route("/", web::get().to(server_controller::secure_home))
|
||||
// Web API
|
||||
// Server controller
|
||||
.route(
|
||||
"/web_api/server/config",
|
||||
web::get().to(server_controller::config),
|
||||
)
|
||||
// Auth controller
|
||||
.route(
|
||||
"/web_api/auth/password_auth",
|
||||
web::post().to(auth_controller::password_auth),
|
||||
@ -123,6 +125,7 @@ pub async fn secure_server(energy_actor: EnergyActorAddr) -> anyhow::Result<()>
|
||||
"/web_api/auth/sign_out",
|
||||
web::get().to(auth_controller::sign_out),
|
||||
)
|
||||
// Energy controller
|
||||
.route(
|
||||
"/web_api/energy/curr_consumption",
|
||||
web::get().to(energy_controller::curr_consumption),
|
||||
@ -131,6 +134,7 @@ pub async fn secure_server(energy_actor: EnergyActorAddr) -> anyhow::Result<()>
|
||||
"/web_api/energy/cached_consumption",
|
||||
web::get().to(energy_controller::cached_consumption),
|
||||
)
|
||||
// Devices controller
|
||||
.route(
|
||||
"/web_api/devices/list_pending",
|
||||
web::get().to(devices_controller::list_pending),
|
||||
@ -155,6 +159,11 @@ pub async fn secure_server(energy_actor: EnergyActorAddr) -> anyhow::Result<()>
|
||||
"/web_api/device/{id}",
|
||||
web::delete().to(devices_controller::delete_device),
|
||||
)
|
||||
// Relays API
|
||||
.route(
|
||||
"/web_api/relays/list",
|
||||
web::get().to(relays_controller::get_list),
|
||||
)
|
||||
// Devices API
|
||||
.route(
|
||||
"/devices_api/utils/time",
|
||||
|
Reference in New Issue
Block a user