Add function to delete sorting presets

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/12/head
trivernis 3 years ago
parent c34d9d5649
commit 78a5780ff1
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -27,6 +27,16 @@ impl SortingPresetDao {
Ok(presets)
}
#[tracing::instrument(level = "debug", skip(self))]
pub async fn delete(&self, id: i32) -> RepoResult<()> {
sorting_preset::Entity::delete_many()
.filter(sorting_preset::Column::Id.eq(id))
.exec(&self.ctx.db)
.await?;
Ok(())
}
}
fn map_sorting_preset_dto(

Loading…
Cancel
Save