Skip to content

Commit cb1e04e

Browse files
committed
backend: also update state change on mgmt request
1 parent 59c72e4 commit cb1e04e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/src/routes/management.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use crate::{
3333
error::Error,
3434
rate_limit::ChargerRateLimiter,
3535
routes::{auth::login::FindBy, charger::add::get_charger_from_db, user::get_user_id},
36-
utils::{get_charger_by_uid, get_connection, parse_uuid, web_block_unpacked},
36+
utils::{get_charger_by_uid, get_connection, parse_uuid, update_charger_state_change, web_block_unpacked},
3737
AppState, BridgeState,
3838
};
3939

@@ -397,6 +397,8 @@ pub async fn management(
397397
})
398398
.await?;
399399

400+
update_charger_state_change(charger_id, state).await;
401+
400402
let time = match SystemTime::now().duration_since(UNIX_EPOCH) {
401403
Ok(time) => time,
402404
Err(err) => {

0 commit comments

Comments
 (0)