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