title is now also part of the whole process

This commit is contained in:
2026-03-03 12:58:45 +01:00
parent cf67c980a2
commit 37b8fe5e56
7 changed files with 64 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
use axum::{Json, debug_handler, extract::{Query, State}, http::StatusCode, response::IntoResponse};
use chrono::{DateTime, Local, Utc};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use utoipa::{IntoParams, IntoResponses, ToSchema};
@@ -7,7 +7,7 @@ use crate::{AppState, types::Alarm};
#[derive(ToSchema, Serialize)]
pub struct OkResponse {
name: String,
title: String,
enabled: bool,
time: DateTime<Utc>,
}
@@ -39,7 +39,7 @@ pub struct RequestQuery {
impl From<Alarm> for OkResponse {
fn from(value: Alarm) -> Self {
Self {
name: value.time.to_string(),
title: value.title,
enabled: value.enabled,
time: value.time,
}