From d6e2383bd6d41cacb5a478faa8b01e55ff777b4c Mon Sep 17 00:00:00 2001 From: Angelo Capossele <angelocapossele@gmail.com> Date: Thu, 9 Jul 2020 13:00:12 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Change=20spammer=20API=20to=20ac?= =?UTF-8?q?cept=20message=20per=20minute=20(#635)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/webapi/spammer/webapi.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/webapi/spammer/webapi.go b/plugins/webapi/spammer/webapi.go index bc92a605..b563e267 100644 --- a/plugins/webapi/spammer/webapi.go +++ b/plugins/webapi/spammer/webapi.go @@ -15,12 +15,12 @@ func handleRequest(c echo.Context) error { switch request.Cmd { case "start": - if request.MPS == 0 { - request.MPS = 1 + if request.MPM == 0 { + request.MPM = 1 } messageSpammer.Shutdown() - messageSpammer.Start(request.MPS, time.Second) + messageSpammer.Start(request.MPM, time.Minute) return c.JSON(http.StatusOK, Response{Message: "started spamming messages"}) case "stop": messageSpammer.Shutdown() @@ -39,5 +39,5 @@ type Response struct { // Request contains the parameters of a spammer request. type Request struct { Cmd string `json:"cmd"` - MPS int `json:"mps"` + MPM int `json:"mpm"` } -- GitLab