This commit is contained in:
2026-07-27 18:28:21 +08:00
parent c04caf2f1f
commit 8835607ccd
6 changed files with 1662 additions and 4 deletions
+7 -1
View File
@@ -438,6 +438,9 @@ std::string model_file_name(std::string_view model_type, std::string_view aircra
if (model_type == "base_station") {
return "base-station-custom.glb";
}
if (model_type == "device") {
return "device-custom.glb";
}
throw std::invalid_argument("invalid model_type");
}
void save_uploaded_model_file(const drogon::HttpFile& upload,
@@ -473,9 +476,12 @@ void save_uploaded_model_file(const drogon::HttpFile& upload,
else if (model_type == "aircraft_type") {
global->map_model_config.aircraft_models[std::string(aircraft_model_key)].url = url;
}
else {
else if (model_type == "base_station") {
global->map_model_config.base_station_model.url = url;
}
else {
global->map_model_config.device_model.url = url;
}
}
void handle_map_model_upload(const drogon::HttpRequestPtr& req, Global* global) {
drogon::MultiPartParser parser;