From 0e220b0b39a765762c48a7fa620b15bc78bd0a38 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Wed, 13 Dec 2023 18:55:49 +0800 Subject: [PATCH] api: fix the output of some APIs (#7542) ref tikv/pd#4399 Signed-off-by: Ryan Leung Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> --- server/api/store.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/api/store.go b/server/api/store.go index 8537cd45c5b..44e178c23fd 100644 --- a/server/api/store.go +++ b/server/api/store.go @@ -334,7 +334,7 @@ func (h *storeHandler) SetStoreLabel(w http.ResponseWriter, r *http.Request) { // @Param id path integer true "Store Id" // @Param body body object true "Labels in json format" // @Produce json -// @Success 200 {string} string "The store's label is updated." +// @Success 200 {string} string "The label is deleted for store." // @Failure 400 {string} string "The input is invalid." // @Failure 500 {string} string "PD server failed to proceed the request." // @Router /store/{id}/label [delete] @@ -369,7 +369,7 @@ func (h *storeHandler) DeleteStoreLabel(w http.ResponseWriter, r *http.Request) // @Param id path integer true "Store Id" // @Param body body object true "json params" // @Produce json -// @Success 200 {string} string "The store's label is updated." +// @Success 200 {string} string "The store's weight is updated." // @Failure 400 {string} string "The input is invalid." // @Failure 500 {string} string "PD server failed to proceed the request." // @Router /store/{id}/weight [post] @@ -413,7 +413,7 @@ func (h *storeHandler) SetStoreWeight(w http.ResponseWriter, r *http.Request) { return } - h.rd.JSON(w, http.StatusOK, "The store's label is updated.") + h.rd.JSON(w, http.StatusOK, "The store's weight is updated.") } // FIXME: details of input json body params @@ -423,7 +423,7 @@ func (h *storeHandler) SetStoreWeight(w http.ResponseWriter, r *http.Request) { // @Param id path integer true "Store Id" // @Param body body object true "json params" // @Produce json -// @Success 200 {string} string "The store's label is updated." +// @Success 200 {string} string "The store's limit is updated." // @Failure 400 {string} string "The input is invalid." // @Failure 500 {string} string "PD server failed to proceed the request." // @Router /store/{id}/limit [post] @@ -486,7 +486,7 @@ func (h *storeHandler) SetStoreLimit(w http.ResponseWriter, r *http.Request) { return } } - h.rd.JSON(w, http.StatusOK, "The store's label is updated.") + h.rd.JSON(w, http.StatusOK, "The store's limit is updated.") } type storesHandler struct {