Skip to content

Commit

Permalink
fix healty
Browse files Browse the repository at this point in the history
  • Loading branch information
cherry-yl-sh committed Mar 4, 2024
1 parent 5e8450a commit d70f4a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions rpc_server/routers/method_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import "github.com/gin-gonic/gin"
type RestfulMethod string

const (
PUT RestfulMethod = "PUT"
GET RestfulMethod = "GET"
DELETE RestfulMethod = "DELETE"
POST RestfulMethod = "POST"
PUT RestfulMethod = "PUT"
GET RestfulMethod = "GET"
DELETE RestfulMethod = "DELETE"
POST RestfulMethod = "POST"
HEAD RestfulMethod = "HEAD"
OPTIONS RestfulMethod = "OPTIONS"
)

type RouterMap struct {
Expand Down
2 changes: 1 addition & 1 deletion rpc_server/routers/routers_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func init() {
PrivateRouterMaps = append(PrivateRouterMaps, RouterMap{string(GetSupportStrategy), []RestfulMethod{GET}, v1.GetSupportStrategy})
PrivateRouterMaps = append(PrivateRouterMaps, RouterMap{string(GetSupportEntrypoint), []RestfulMethod{GET}, v1.GetSupportEntrypoint})
PublicRouterMaps = append(PublicRouterMaps, RouterMap{string(Auth), []RestfulMethod{POST}, api.Auth})
PublicRouterMaps = append(PublicRouterMaps, RouterMap{string(Healthz), []RestfulMethod{GET, POST, PUT, DELETE}, api.Healthz})
PublicRouterMaps = append(PublicRouterMaps, RouterMap{string(Healthz), []RestfulMethod{GET, HEAD, OPTIONS}, api.Healthz})
}

type Path string
Expand Down

0 comments on commit d70f4a6

Please sign in to comment.