MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / RegisterRoutes

Method RegisterRoutes

internal/api/plate.go:26–34  ·  view source on GitHub ↗
(server *gin.Engine)

Source from the content-addressed store, hash-verified

24}
25
26func (h *PlateHandler) RegisterRoutes(server *gin.Engine) {
27 casbinMiddleware := middleware.NewCasbinMiddleware(h.ce)
28 permissionGroup := server.Group("/api/plate")
29 permissionGroup.Use(casbinMiddleware.CheckCasbin())
30 permissionGroup.POST("/create", h.CreatePlate)
31 permissionGroup.POST("/update", h.UpdatePlate)
32 permissionGroup.DELETE("/delete/:plateId", h.DeletePlate)
33 permissionGroup.POST("/list", h.ListPlate)
34}
35
36func (h *PlateHandler) CreatePlate(ctx *gin.Context) {
37 var req req.CreatePlateReq

Callers

nothing calls this directly

Calls 2

CheckCasbinMethod · 0.95
NewCasbinMiddlewareFunction · 0.92

Tested by

no test coverage detected