diff --git a/server/pkg/api/rest/controller/benchmarkInfo.go b/server/pkg/api/rest/controller/benchmarkInfo.go index a1ea9e4..9c3ff1b 100644 --- a/server/pkg/api/rest/controller/benchmarkInfo.go +++ b/server/pkg/api/rest/controller/benchmarkInfo.go @@ -60,7 +60,7 @@ func GetBenchmarkInfo(c echo.Context) error { // @Success 200 {object} model.Benchmark "Successfully get information of the benchmark." // @Failure 400 {object} common.ErrorResponse "Sent bad request." // @Failure 500 {object} common.ErrorResponse "Failed to get information of the benchmark." -// @Router /bench/{connId}/run [get] +// @Router /bench/{connId}/run [post] func RunBenchmarkInfo(c echo.Context) error { connID := c.Param("connId") if connID == "" { @@ -127,7 +127,7 @@ func RunBenchmarkInfo(c echo.Context) error { // @Success 200 {object} model.SimpleMsg "Benchmark Stopped." // @Failure 400 {object} common.ErrorResponse "Sent bad request." // @Failure 500 {object} common.ErrorResponse "Failed to stop of the benchmark." -// @Router /bench/{connId}/stop [get] +// @Router /bench/{connId}/stop [post] func StopBenchmarkInfo(c echo.Context) error { connID := c.Param("connId") if connID == "" { diff --git a/server/pkg/api/rest/docs/docs.go b/server/pkg/api/rest/docs/docs.go index 41ec304..ec22bbf 100644 --- a/server/pkg/api/rest/docs/docs.go +++ b/server/pkg/api/rest/docs/docs.go @@ -65,7 +65,7 @@ const docTemplate = `{ } }, "/bench/{connId}/run": { - "get": { + "post": { "description": "Run the benchmark information of the connection information. If no Benchmark Agent is present on the connected server, it will be automatically installed, and the benchmark will be executed.", "consumes": [ "application/json" @@ -110,7 +110,7 @@ const docTemplate = `{ } }, "/bench/{connId}/stop": { - "get": { + "post": { "description": "Stop the benchmark", "consumes": [ "application/json" diff --git a/server/pkg/api/rest/docs/swagger.json b/server/pkg/api/rest/docs/swagger.json index 89a1e5d..9ca93d9 100644 --- a/server/pkg/api/rest/docs/swagger.json +++ b/server/pkg/api/rest/docs/swagger.json @@ -58,7 +58,7 @@ } }, "/bench/{connId}/run": { - "get": { + "post": { "description": "Run the benchmark information of the connection information. If no Benchmark Agent is present on the connected server, it will be automatically installed, and the benchmark will be executed.", "consumes": [ "application/json" @@ -103,7 +103,7 @@ } }, "/bench/{connId}/stop": { - "get": { + "post": { "description": "Stop the benchmark", "consumes": [ "application/json" diff --git a/server/pkg/api/rest/docs/swagger.yaml b/server/pkg/api/rest/docs/swagger.yaml index 35310f2..a3a023e 100644 --- a/server/pkg/api/rest/docs/swagger.yaml +++ b/server/pkg/api/rest/docs/swagger.yaml @@ -1302,7 +1302,7 @@ paths: tags: - '[Import] BenchmarkInfo' /bench/{connId}/run: - get: + post: consumes: - application/json description: Run the benchmark information of the connection information. If @@ -1334,7 +1334,7 @@ paths: tags: - '[Import] BenchmarkInfo' /bench/{connId}/stop: - get: + post: consumes: - application/json description: Stop the benchmark