From 9595e94090820b3e0781d11ab1d596c037398072 Mon Sep 17 00:00:00 2001 From: Brian Ginsburg Date: Wed, 4 Dec 2024 15:27:39 -0800 Subject: [PATCH] feat: Add RemoveDeal method --- pkg/solver/store/db/db.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/solver/store/db/db.go b/pkg/solver/store/db/db.go index 0eb23ba5..255436f7 100644 --- a/pkg/solver/store/db/db.go +++ b/pkg/solver/store/db/db.go @@ -494,5 +494,10 @@ func (store *SolverStoreDatabase) RemoveResourceOffer(id string) error { } func (store *SolverStoreDatabase) RemoveDeal(id string) error { + var record Deal + result := store.db.Where("c_id = ?", id).Delete(&record) + if result.Error != nil { + return result.Error + } return nil }