Skip to content

Commit

Permalink
api: fix the output of some APIs (tikv#7542)
Browse files Browse the repository at this point in the history
ref tikv#4399

Signed-off-by: Ryan Leung <[email protected]>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
rleungx and ti-chi-bot[bot] committed Dec 13, 2023
1 parent 48fabb7 commit 0e220b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/api/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand All @@ -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]
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0e220b0

Please sign in to comment.