typ refactor

This commit is contained in:
2026-06-03 22:08:44 +02:00
parent 16f8a929d2
commit b3b7b75ea8
22 changed files with 92 additions and 64 deletions

View File

@@ -1,5 +1,4 @@
use anyhow::Error;
use chrono::Utc;
use super::Service;
use crate::domain::typ::{
@@ -9,14 +8,9 @@ use crate::domain::typ::{
impl Service {
pub async fn typ_loeschen(&self, input: TypLoeschenInput) -> Result<model::Typ, Error> {
let typ_input = entity::Typ {
id: input.id,
typname: String::new(),
erstellt_am: None,
geaendert_am: Some(Utc::now()),
};
let typ_loeschen = entity::TypLoeschen { id: input.id };
let typ = self.repo.typ_loeschen(&self.db, &typ_input).await?;
let typ = self.repo.typ_loeschen(&self.db, &typ_loeschen).await?;
Ok(typ)
}
}