优化结构
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"kra/internal/service"
|
||||
"kra/internal/service/dto"
|
||||
systemservice "kra/internal/service/system"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Authority struct{ service *service.AuthorityService }
|
||||
type Authority struct {
|
||||
service *systemservice.AuthorityService
|
||||
}
|
||||
|
||||
func NewAuthority(service *service.AuthorityService) *Authority { return &Authority{service: service} }
|
||||
func NewAuthority(service *systemservice.AuthorityService) *Authority {
|
||||
return &Authority{service: service}
|
||||
}
|
||||
|
||||
func (h *Authority) List(c *gin.Context) {
|
||||
items, err := h.service.Authorities(c.Request.Context())
|
||||
|
||||
Reference in New Issue
Block a user