Skip to content

Commit

Permalink
添加资源控制器生成
Browse files Browse the repository at this point in the history
  • Loading branch information
baichou committed Oct 21, 2022
1 parent 4896faa commit 16e81e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion console/commands/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ func genRoutesFunc(g *ApiGroups, m map[string]string) string {
for _, server := range g.servers {
for s, v := range server.Opt {
if s == "http.Resource" {
str += "\n\t\t" + homeApi + ".Any(\"" + v.Val + "\"):" + "c." + parser.StringToSnake(server.Name) + ".GinHandleResource,"
str += "\n\t\t" + homeApi + ".Get(\"" + v.Val + "\"):" + "c." + parser.StringToSnake(server.Name) + ".GinHandleResource,"
str += "\n\t\t" + homeApi + ".Any(\"" + v.Val + "/:action\"):" + "c." + parser.StringToSnake(server.Name) + ".GinHandleResource,"
}
}
for rName, rpc := range server.Rpc {
Expand Down

0 comments on commit 16e81e1

Please sign in to comment.