showing id now also when executing a get Request

This commit is contained in:
2026-03-03 15:27:51 +01:00
parent 76067d76ac
commit a65f9852f3

View File

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