Skip to content

Commit 8eabc36

Browse files
authored
Merge pull request #160 from github/meiji163-unthrottle-store
Add store_name to unthrottle
2 parents bc46ca8 + 79cac6c commit 8eabc36

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/http/api.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,14 @@ response:
278278

279279
// UnthrottleApp unthrottles given app.
280280
func (api *APIImpl) UnthrottleApp(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
281+
storeName := r.URL.Query().Get("store_name")
281282
appName := ps.ByName("app")
282-
appWithStorePrefix := appName + "/"
283+
if storeName != "" {
284+
appName += "/" + storeName
285+
}
283286

284287
for app := range api.consensusService.ThrottledAppsMap() {
285-
if app == appName || strings.HasPrefix(app, appWithStorePrefix) {
288+
if app == appName {
286289
err := api.consensusService.UnthrottleApp(app)
287290
if err != nil {
288291
api.respondGeneric(w, r, err)

0 commit comments

Comments
 (0)