feat: update area management to implement hard delete and adjust related references

This commit is contained in:
gabdevele
2026-06-15 15:50:12 +02:00 Unverified
parent bf85168914
commit 4f80d7f995
9 changed files with 30 additions and 24 deletions
+2 -3
View File
@@ -107,7 +107,7 @@ std::optional<long long> findArea(double latitude, double longitude)
{
const auto result = drogon::app().getDbClient()->execSqlSync(
"SELECT id, JSON_UNQUOTE(JSON_EXTRACT(boundary_geojson, '$')) AS geojson "
"FROM areas WHERE active = TRUE");
"FROM areas");
Json::CharReaderBuilder builder;
for (const auto &row : result)
@@ -647,8 +647,7 @@ Json::Value ReportService::listAreas()
{
auto response = success();
response["areas"] = repositories::resultToJson(
drogon::app().getDbClient()->execSqlSync(
"SELECT * FROM areas WHERE active = TRUE ORDER BY name"));
drogon::app().getDbClient()->execSqlSync("SELECT * FROM areas ORDER BY name"));
return response;
}