added http endpoint to update alarms. For now it will not update the schedules automatically

This commit is contained in:
2026-03-03 15:15:06 +01:00
parent 37b8fe5e56
commit 76067d76ac
7 changed files with 132 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ pub struct RequestBody {
#[derive(ToSchema, Serialize)]
pub struct OkResponseBody {
id: i32,
time: DateTime<Utc>,
title: String,
enabled: bool,
@@ -43,7 +44,12 @@ impl IntoResponse for Responses {
impl From<Alarm> for OkResponseBody {
fn from(value: Alarm) -> Self {
OkResponseBody { time: value.time, enabled: value.enabled, title: value.title }
OkResponseBody {
time: value.time,
enabled: value.enabled,
title: value.title,
id: value.id
}
}
}