Add data_version field to responses of all plugins. (#5387)

This commit is contained in:
Lev Dragunov
2022-08-22 22:07:32 +03:00
committed by GitHub
parent 972a848094
commit 928867c520
14 changed files with 183 additions and 17 deletions
+5
View File
@@ -89,6 +89,11 @@ class MatchAPI final : public RouteAPI
}
response.values["matchings"] = std::move(routes);
response.values["code"] = "Ok";
auto data_timestamp = facade.GetTimestamp();
if (!data_timestamp.empty())
{
response.values["data_version"] = data_timestamp;
}
}
protected:
+5
View File
@@ -116,6 +116,11 @@ class NearestAPI final : public BaseAPI
}
response.values["code"] = "Ok";
auto data_timestamp = facade.GetTimestamp();
if (!data_timestamp.empty())
{
response.values["data_version"] = data_timestamp;
}
}
const NearestParameters &parameters;
+5
View File
@@ -226,6 +226,11 @@ class TableAPI final : public BaseAPI
}
response.values["code"] = "Ok";
auto data_timestamp = facade.GetTimestamp();
if (!data_timestamp.empty())
{
response.values["data_version"] = data_timestamp;
}
}
protected:
+5
View File
@@ -87,6 +87,11 @@ class TripAPI final : public RouteAPI
}
response.values["trips"] = std::move(routes);
response.values["code"] = "Ok";
auto data_timestamp = facade.GetTimestamp();
if (!data_timestamp.empty())
{
response.values["data_version"] = data_timestamp;
}
}
protected: