From 1065a5f88fe6c3eb7e859b0067dd3396cc5a1419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Thu, 11 May 2017 21:40:37 +0200 Subject: [PATCH] remove imp details of wip --- toREST/include/torrents.hpp | 11 +---------- toREST/tests/torrents_test.cpp | 11 ----------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/toREST/include/torrents.hpp b/toREST/include/torrents.hpp index 400903a..011e6cd 100644 --- a/toREST/include/torrents.hpp +++ b/toREST/include/torrents.hpp @@ -1,9 +1,9 @@ #ifndef _TR_TORRENTS_HPP_ #define _TR_TORRENTS_HPP_ +#include #include #include #include -#include namespace tr { namespace session { @@ -84,11 +84,6 @@ void post(settings opts, torrent_session &session, response resp, request req) { } else params.save_path = boost::filesystem::path(opts.root_dir / opts.default_download_dir).string(); - // if (request_object.find("paused") != request_object.end()) { - - // } - - session.async_add_torrent(params); std::stringstream ss; @@ -96,10 +91,6 @@ void post(settings opts, torrent_session &session, response resp, request req) { http_response.add_header({"Location", "/session/torrents/" + ss.str()}); return respond(http::created); - - - // session.async_add_torrent(params); - // http_response.add_header({"Location",params.info_hash.to_string()}); } } } diff --git a/toREST/tests/torrents_test.cpp b/toREST/tests/torrents_test.cpp index 2684700..1508730 100644 --- a/toREST/tests/torrents_test.cpp +++ b/toREST/tests/torrents_test.cpp @@ -95,17 +95,6 @@ SCENARIO("We are running a POST /session/torrents resource") { REQUIRE((torrent_session.get_torrents()[0]).status().save_path == "/music"); } } - // tr::session::torrents::get(torrent_session, response, request); - // CommonResponse::ok(response, {{"torrents", nlohmann::json::array()}}); - // } - // } - // GIVEN("we have at least one torrent") { - // auto t_torrent = TestTorrent(); - // torrent_session.get_torrents().emplace_back(t_torrent); - // THEN("the server should reply with an array of torrents") { - // tr::session::torrents::get(torrent_session, response, request); - // CommonResponse::ok(response, {{"torrents", {torrent}}}); - // }; } WHEN("we recive an invalid request") { GIVEN("the request doesn't contain valid json") {