service/codecreate/template/controller_center.txt

8 lines
769 B
Plaintext
Raw Normal View History

2023-12-21 22:17:40 +08:00
#{moduleName}proto "service/api/proto/#{moduleName}/proto"
// #{EntityCNName}
op#{EntityName}Group := r.Group("/api/#{moduleName}", PrepareToC())
2024-02-01 09:52:45 +08:00
op#{EntityName}Group.POST("create", middleware.JSONParamValidator(#{moduleName}proto.OpCreateReq{}), middleware.JwtAuthenticator(), OpCreate#{EntityName})
op#{EntityName}Group.POST("update", middleware.JSONParamValidator(#{moduleName}proto.OpUpdateReq{}), middleware.JwtAuthenticator(), OpUpdate#{EntityName})
op#{EntityName}Group.POST("delete", middleware.JSONParamValidator(#{moduleName}proto.OpDeleteReq{}), middleware.JwtAuthenticator(), OpDelete#{EntityName})
op#{EntityName}Group.POST("list", middleware.JSONParamValidator(#{moduleName}proto.OpListReq{}), middleware.JwtAuthenticator(), OpGet#{EntityName}List)