added http endpoint to update alarms. For now it will not update the schedules automatically
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user