2fas-server/internal/api/mobile/app/command/delete_mobile_device.go

20 lines
365 B
Go
Raw Normal View History

2022-12-31 10:22:38 +01:00
package command
import (
"github.com/doug-martin/goqu/v9"
"gorm.io/gorm"
)
type RemoveAllMobileDevices struct{}
type RemoveAllMobileDevicesHandler struct {
Database *gorm.DB
Qb *goqu.Database
}
func (h *RemoveAllMobileDevicesHandler) Handle(cmd *RemoveAllMobileDevices) {
sql, _, _ := h.Qb.Truncate("mobile_devices").ToSQL()
h.Database.Exec(sql)
}