From f5f457aa6f536782c9a28cb6fccfaf26e54f1a1c Mon Sep 17 00:00:00 2001 From: Vargur <40493346+janLalawa@users.noreply.github.com> Date: Sat, 31 May 2025 01:21:00 +0100 Subject: [PATCH] Fix HTTP endpoint logic: remove incorrect negation in rare-tables path check The !req.path.starts_with( was causing every subsequent command to be processed as a rare-tables substring command. --- src/HTTPServer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HTTPServer.cc b/src/HTTPServer.cc index 1cb9cc8a..583a8d6b 100644 --- a/src/HTTPServer.cc +++ b/src/HTTPServer.cc @@ -798,7 +798,7 @@ asio::awaitable> HTTPServer::handle_request(shared } else if (req.path == "/y/data/rare-tables") { this->require_GET(req); ret = this->generate_rare_table_list_json(); - } else if (!req.path.starts_with("/y/data/rare-tables/")) { + } else if (req.path.starts_with("/y/data/rare-tables/")) { this->require_GET(req); ret = co_await this->generate_rare_table_json(req.path.substr(20)); } else if (req.path == "/y/data/quests") {