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

Method RegisterRoutes

internal/api/activity.go:25–29  ·  view source on GitHub ↗
(server *gin.Engine)

Source from the content-addressed store, hash-verified

23}
24
25func (ah *ActivityHandler) RegisterRoutes(server *gin.Engine) {
26 casbinMiddleware := middleware.NewCasbinMiddleware(ah.ce)
27 historyGroup := server.Group("/api/activity")
28 historyGroup.GET("/recent", casbinMiddleware.CheckCasbin(), WrapQuery(ah.GetRecentActivity)) // 获取最近的活动记录
29}
30
31// GetRecentActivity 获取最近的活动记录
32func (ah *ActivityHandler) GetRecentActivity(ctx *gin.Context, _ req.GetRecentActivityReq) (Result, error) {

Callers

nothing calls this directly

Calls 3

CheckCasbinMethod · 0.95
NewCasbinMiddlewareFunction · 0.92
WrapQueryFunction · 0.85

Tested by

no test coverage detected