Can manually download an OTA update

This commit is contained in:
2024-10-08 22:13:36 +02:00
parent 6cf7c2cae1
commit 2e4a2b68dd
4 changed files with 53 additions and 8 deletions
central_backend/src/server
central_frontend/src

@ -191,13 +191,16 @@ pub async fn secure_server(energy_actor: EnergyActorAddr) -> anyhow::Result<()>
"/web_api/ota/{platform}/{version}",
web::post().to(ota_controller::upload_firmware),
)
.route(
"/web_api/ota/{platform}/{version}",
web::get().to(ota_controller::download_firmware),
)
// TODO : delete an OTA file
.route("/web_api/ota", web::get().to(ota_controller::list_all_ota))
.route(
"/web_api/ota/{platform}",
web::get().to(ota_controller::list_updates_platform),
)
// TODO : download a OTA file
// TODO : delete an OTA file
.route(
"/web_api/ota/set_desired_version",
web::post().to(ota_controller::set_desired_version),