feat: add remove upstream and remove upstream target handlers
This commit is contained in:
@@ -208,6 +208,11 @@ impl UpstreamService {
|
||||
)))?
|
||||
});
|
||||
with_conn!(&*self.connection, tx, conn, {
|
||||
// delete all targets belonging to the upstream
|
||||
upstream_target::Entity::delete_many()
|
||||
.filter(upstream_target::Column::UpstreamId.eq(upstream_id))
|
||||
.exec(*conn)
|
||||
.await?;
|
||||
model.delete(*conn).await?;
|
||||
Ok(())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user