2fas-server/internal/api/browser_extension/app/command/remove_browser_extension.go
2022-12-31 10:22:38 +01:00

21 lines
433 B
Go

package command
import (
"github.com/doug-martin/goqu/v9"
"gorm.io/gorm"
)
// RemoveAllBrowserExtensions command for tests
type RemoveAllBrowserExtensions struct{}
type RemoveAllBrowserExtensionsHandler struct {
Database *gorm.DB
Qb *goqu.Database
}
func (h *RemoveAllBrowserExtensionsHandler) Handle(cmd *RemoveAllBrowserExtensions) {
sql, _, _ := h.Qb.Truncate("browser_extensions").ToSQL()
h.Database.Exec(sql)
}