diff --git a/server/api/router.go b/server/api/router.go index 1d77c42e93d..c5ccd7bc4b2 100644 --- a/server/api/router.go +++ b/server/api/router.go @@ -216,7 +216,7 @@ func createRouter(prefix string, svr *server.Server) *mux.Router { registerFunc(clusterRouter, "/store/{id}/limit", storeHandler.SetStoreLimit, setMethods(http.MethodPost), setAuditBackend(localLog, prometheus)) storesHandler := newStoresHandler(handler, rd) - registerFunc(clusterRouter, "/stores", storesHandler.GetStores, setMethods(http.MethodGet), setAuditBackend(prometheus)) + registerFunc(clusterRouter, "/stores", storesHandler.GetAllStores, setMethods(http.MethodGet), setAuditBackend(prometheus)) registerFunc(clusterRouter, "/stores/remove-tombstone", storesHandler.RemoveTombStone, setMethods(http.MethodDelete), setAuditBackend(localLog, prometheus)) registerFunc(clusterRouter, "/stores/limit", storesHandler.GetAllStoresLimit, setMethods(http.MethodGet), setAuditBackend(prometheus)) registerFunc(clusterRouter, "/stores/limit", storesHandler.SetAllStoresLimit, setMethods(http.MethodPost), setAuditBackend(localLog, prometheus)) diff --git a/server/api/store.go b/server/api/store.go index 12915d1c726..c0a5fd5599a 100644 --- a/server/api/store.go +++ b/server/api/store.go @@ -734,13 +734,13 @@ func (h *storesHandler) GetStoresProgress(w http.ResponseWriter, r *http.Request } // @Tags store -// @Summary Get stores in the cluster. +// @Summary Get all stores in the cluster. // @Param state query array true "Specify accepted store states." // @Produce json // @Success 200 {object} StoresInfo // @Failure 500 {string} string "PD server failed to proceed the request." // @Router /stores [get] -func (h *storesHandler) GetStores(w http.ResponseWriter, r *http.Request) { +func (h *storesHandler) GetAllStores(w http.ResponseWriter, r *http.Request) { rc := getCluster(r) stores := rc.GetMetaStores() StoresInfo := &StoresInfo{