diff --git a/main.cpp b/main.cpp index 2763747..48142f7 100644 --- a/main.cpp +++ b/main.cpp @@ -54,8 +54,14 @@ StringResponse HandleRequest(StringRequest&& req) } string_view config_ref {config.begin(), config.end()}; - auto parsed_config = json::parse(config_ref); + StringResponse res(http::status::ok, 1); + res.set(http::field::content_type, content_type::k_JSON); + res.body() = json::serialize(parsed_config.as_object().at("maps"sv).as_array()); + res.content_length(res.body().size()); + res.keep_alive(true); + + return res; } else if (equal(k_MapsPattern.begin(), k_MapsPattern.end(),