diff --git a/controllers/payinvoice.ctrl.go b/controllers/payinvoice.ctrl.go index cd4a445..b8242b8 100644 --- a/controllers/payinvoice.ctrl.go +++ b/controllers/payinvoice.ctrl.go @@ -87,7 +87,7 @@ func (controller *PayInvoiceController) PayInvoice(c echo.Context) error { currentBalance, err := controller.svc.CurrentUserBalance(c.Request().Context(), userID) if err != nil { - controller.svc.DB.NewDelete().Model(&invoice).Where("id = ?", invoice.ID).Exec(c.Request().Context()) + controller.svc.DB.NewDelete().Where("id = ?", invoice.ID).Exec(c.Request().Context()) return err } diff --git a/controllers_v2/payinvoice.ctrl.go b/controllers_v2/payinvoice.ctrl.go index de770dc..7dabc8f 100644 --- a/controllers_v2/payinvoice.ctrl.go +++ b/controllers_v2/payinvoice.ctrl.go @@ -89,7 +89,7 @@ func (controller *PayInvoiceController) PayInvoice(c echo.Context) error { currentBalance, err := controller.svc.CurrentUserBalance(c.Request().Context(), userID) if err != nil { - controller.svc.DB.NewDelete().Model(&invoice).Where("id = ?", invoice.ID).Exec(c.Request().Context()) + controller.svc.DB.NewDelete().Where("id = ?", invoice.ID).Exec(c.Request().Context()) return err }