Can delete inbox entry
This commit is contained in:
@@ -105,3 +105,9 @@ pub async fn get_by_id(entry_id: InboxEntryID) -> anyhow::Result<InboxEntry> {
|
||||
.filter(inbox::dsl::id.eq(entry_id.0))
|
||||
.get_result(&mut db()?)?)
|
||||
}
|
||||
|
||||
/// Delete an inbox entry
|
||||
pub async fn delete(id: InboxEntryID) -> anyhow::Result<()> {
|
||||
diesel::delete(inbox::dsl::inbox.filter(inbox::dsl::id.eq(id.0))).execute(&mut db()?)?;
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user