You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OneAuth/api/role/auth.go

23 lines
388 B
Go

3 years ago
package role
import (
"OneAuth/cfg"
"OneAuth/libs/base"
"OneAuth/models"
"github.com/veypi/OneBD"
"github.com/veypi/OneBD/core"
)
var authP = OneBD.NewHandlerPool(func() core.Handler {
return &authHandler{}
})
type authHandler struct {
base.ApiHandler
}
func (h *authHandler) Get() (interface{}, error) {
l := make([]*models.Auth, 0, 10)
return &l, cfg.DB().Find(&l).Error
}