title is now also part of the whole process
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user