mirror of
https://github.com/twofas/2fas-server.git
synced 2024-12-12 20:20:19 +01:00
21 lines
433 B
Go
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)
|
||
|
}
|