From 4574bd1e5c5bf34ca6aee6f2a5398dc301d7513e Mon Sep 17 00:00:00 2001 From: zhupengfei Date: Sun, 16 Dec 2018 10:48:15 +0800 Subject: [PATCH] web_service: Change endpoint to `/lobby`. Preparation for shipping. --- src/web_service/announce_room_json.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/web_service/announce_room_json.cpp b/src/web_service/announce_room_json.cpp index f1a690443..2d2601256 100644 --- a/src/web_service/announce_room_json.cpp +++ b/src/web_service/announce_room_json.cpp @@ -114,12 +114,12 @@ Common::WebResult RoomJson::Update() { return Common::WebResult{Common::WebResult::Code::LibError, "Room is not registered"}; } nlohmann::json json{{"players", room.members}}; - return client.PostJson(fmt::format("/lobby2/{}", room_id), json.dump(), false); + return client.PostJson(fmt::format("/lobby/{}", room_id), json.dump(), false); } std::string RoomJson::Register() { nlohmann::json json = room; - auto reply = client.PostJson("/lobby2", json.dump(), false).returned_data; + auto reply = client.PostJson("/lobby", json.dump(), false).returned_data; if (reply.empty()) { return ""; } @@ -134,7 +134,7 @@ void RoomJson::ClearPlayers() { } AnnounceMultiplayerRoom::RoomList RoomJson::GetRoomList() { - auto reply = client.GetJson("/lobby2", true).returned_data; + auto reply = client.GetJson("/lobby", true).returned_data; if (reply.empty()) { return {}; } @@ -149,7 +149,7 @@ void RoomJson::Delete() { Common::DetachedTasks::AddTask( [host{this->host}, username{this->username}, token{this->token}, room_id{this->room_id}]() { // create a new client here because the this->client might be destroyed. - Client{host, username, token}.DeleteJson(fmt::format("/lobby2/{}", room_id), "", false); + Client{host, username, token}.DeleteJson(fmt::format("/lobby/{}", room_id), "", false); }); }