25 lines
802 B
Go
25 lines
802 B
Go
package system
|
|
|
|
import (
|
|
"kra/internal/server/middleware"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type AuthorityRouter struct{}
|
|
|
|
func (r *AuthorityRouter) InitAuthorityRouter(Router *gin.RouterGroup) {
|
|
authorityRouter := Router.Group("authority").Use(middleware.OperationRecordMiddleware())
|
|
authorityRouterWithoutRecord := Router.Group("authority")
|
|
{
|
|
authorityRouter.POST("createAuthority", authorityApi.CreateAuthority)
|
|
authorityRouter.POST("deleteAuthority", authorityApi.DeleteAuthority)
|
|
authorityRouter.PUT("updateAuthority", authorityApi.UpdateAuthority)
|
|
authorityRouter.POST("copyAuthority", authorityApi.CopyAuthority)
|
|
authorityRouter.POST("setDataAuthority", authorityApi.SetDataAuthority)
|
|
}
|
|
{
|
|
authorityRouterWithoutRecord.POST("getAuthorityList", authorityApi.GetAuthorityList)
|
|
}
|
|
}
|