typ refactor
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user