Skip to content

Commit

Permalink
mcs: make compatible with cluster info page display
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Mar 18, 2024
1 parent da3b6e3 commit 6d95602
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/apiv2/handlers/micro_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func RegisterMicroService(r *gin.RouterGroup) {
func GetMembers(c *gin.Context) {
svr := c.MustGet(middlewares.ServerContextKey).(*server.Server)
if !svr.IsAPIServiceMode() {
c.AbortWithStatusJSON(http.StatusServiceUnavailable, "not support micro service")
c.AbortWithStatusJSON(http.StatusNotFound, "not support micro service")

Check warning on line 43 in server/apiv2/handlers/micro_service.go

View check run for this annotation

Codecov / codecov/patch

server/apiv2/handlers/micro_service.go#L43

Added line #L43 was not covered by tests
return
}

Expand All @@ -66,7 +66,7 @@ func GetMembers(c *gin.Context) {
func GetPrimary(c *gin.Context) {
svr := c.MustGet(middlewares.ServerContextKey).(*server.Server)
if !svr.IsAPIServiceMode() {
c.AbortWithStatusJSON(http.StatusServiceUnavailable, "not support micro service")
c.AbortWithStatusJSON(http.StatusNotFound, "not support micro service")

Check warning on line 69 in server/apiv2/handlers/micro_service.go

View check run for this annotation

Codecov / codecov/patch

server/apiv2/handlers/micro_service.go#L69

Added line #L69 was not covered by tests
return
}

Expand Down

0 comments on commit 6d95602

Please sign in to comment.