From 4b7ce87f57b8a33af140b72317d3b56736ba9d5f Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Sat, 12 May 2018 07:32:48 +0300 Subject: [PATCH] Fix params handling for some legacy API methods Closes #8880. --- src/webui/webapplication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webui/webapplication.cpp b/src/webui/webapplication.cpp index 8fd597318..6d938004f 100644 --- a/src/webui/webapplication.cpp +++ b/src/webui/webapplication.cpp @@ -292,9 +292,9 @@ void WebApplication::doProcessRequest() {"query/propertiesFiles", {"torrents", "files", nullptr}}, {"query/getPieceHashes", {"torrents", "pieceHashes", nullptr}}, {"query/getPieceStates", {"torrents", "pieceStates", nullptr}}, - {"command/resume", {"torrents", "resume", nullptr}}, - {"command/pause", {"torrents", "pause", nullptr}}, - {"command/recheck", {"torrents", "recheck", nullptr}}, + {"command/resume", {"torrents", "resume", [this]() { m_params["hashes"] = m_params.take("hash"); }}}, + {"command/pause", {"torrents", "pause", [this]() { m_params["hashes"] = m_params.take("hash"); }}}, + {"command/recheck", {"torrents", "recheck", [this]() { m_params["hashes"] = m_params.take("hash"); }}}, {"command/resumeAll", {"torrents", "resume", [this]() { m_params["hashes"] = "all"; }}}, {"command/pauseAll", {"torrents", "pause", [this]() { m_params["hashes"] = "all"; }}}, {"command/rename", {"torrents", "rename", nullptr}},