Can delete a movement
This commit is contained in:
@ -127,3 +127,10 @@ pub async fn get_list_account(account_id: AccountID) -> anyhow::Result<Vec<Movem
|
||||
.filter(movements::dsl::account_id.eq(account_id.0))
|
||||
.get_results(&mut db()?)?)
|
||||
}
|
||||
|
||||
/// Delete a movement
|
||||
pub async fn delete(id: MovementID) -> anyhow::Result<()> {
|
||||
diesel::delete(movements::dsl::movements.filter(movements::dsl::id.eq(id.0)))
|
||||
.execute(&mut db()?)?;
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user