数据库不存在则创建

This commit is contained in:
2026-08-10 14:51:03 +08:00
parent c268ae23c4
commit 18e92d3631
5 changed files with 153 additions and 50 deletions
+2 -1
View File
@@ -173,6 +173,7 @@ void Global::init_web_server() {
add_path(R"(^/map)");
add_path(R"(^/map3d)");
add_path(R"(^/aircraftlist)");
add_path(R"(^/topology)");
drogon::app().registerHandlerViaRegex(
R"(^/ui(/.*)?$)",
[return_file](const drogon::HttpRequestPtr& req, std::function<void(const drogon::HttpResponsePtr&)>&& callback) {
@@ -184,7 +185,7 @@ void Global::init_web_server() {
}
auto is_spa_path = [](std::string_view value) {
return value == "/" || value == "/map" || value == "/map3d" || value == "/settings" ||
value == "/aircraftlist";
value == "/aircraftlist" || value == "/topology";
};
if (is_spa_path(rp)) {
path += "/index.html";