change library interface to expose json container as structure to exchange data
This commit is contained in:
parent
b50a907ca3
commit
4a6325696e
@ -35,9 +35,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
class OSRM_impl;
|
||||
struct RouteParameters;
|
||||
|
||||
namespace http
|
||||
namespace JSON
|
||||
{
|
||||
class Reply;
|
||||
struct Object;
|
||||
}
|
||||
|
||||
class OSRM
|
||||
@ -48,7 +48,7 @@ class OSRM
|
||||
public:
|
||||
explicit OSRM(ServerPaths paths, const bool use_shared_memory = false);
|
||||
~OSRM();
|
||||
void RunQuery(RouteParameters &route_parameters, http::Reply &reply);
|
||||
int RunQuery(RouteParameters &route_parameters, JSON::Object &json_result);
|
||||
};
|
||||
|
||||
#endif // OSRM_H
|
||||
|
@ -44,8 +44,6 @@ namespace boost { namespace interprocess { class named_mutex; } }
|
||||
#include "../Server/DataStructures/InternalDataFacade.h"
|
||||
#include "../Server/DataStructures/SharedBarriers.h"
|
||||
#include "../Server/DataStructures/SharedDataFacade.h"
|
||||
//TODO: remove
|
||||
#include "../Server/Http/Reply.h"
|
||||
#include "../Util/make_unique.hpp"
|
||||
#include "../Util/ProgramOptions.h"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
@ -104,13 +102,12 @@ void OSRM_impl::RegisterPlugin(BasePlugin *plugin)
|
||||
plugin_map.emplace(plugin->GetDescriptor(), plugin);
|
||||
}
|
||||
|
||||
void OSRM_impl::RunQuery(RouteParameters &route_parameters, http::Reply &reply)
|
||||
int OSRM_impl::RunQuery(RouteParameters &route_parameters, JSON::Object &json_result)
|
||||
{
|
||||
const PluginMap::const_iterator &iter = plugin_map.find(route_parameters.service);
|
||||
|
||||
if (plugin_map.end() != iter)
|
||||
{
|
||||
reply.status = http::Reply::ok;
|
||||
if (barrier)
|
||||
{
|
||||
// lock update pending
|
||||
@ -131,7 +128,7 @@ void OSRM_impl::RunQuery(RouteParameters &route_parameters, http::Reply &reply)
|
||||
->CheckAndReloadFacade();
|
||||
}
|
||||
|
||||
iter->second->HandleRequest(route_parameters, reply);
|
||||
iter->second->HandleRequest(route_parameters, json_result);
|
||||
if (barrier)
|
||||
{
|
||||
// lock query
|
||||
@ -148,10 +145,11 @@ void OSRM_impl::RunQuery(RouteParameters &route_parameters, http::Reply &reply)
|
||||
barrier->no_running_queries_condition.notify_all();
|
||||
}
|
||||
}
|
||||
return 200;
|
||||
}
|
||||
else
|
||||
{
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return 400;
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,7 +162,7 @@ OSRM::OSRM(ServerPaths paths, const bool use_shared_memory)
|
||||
|
||||
OSRM::~OSRM() { OSRM_pimpl_.reset(); }
|
||||
|
||||
void OSRM::RunQuery(RouteParameters &route_parameters, http::Reply &reply)
|
||||
int OSRM::RunQuery(RouteParameters &route_parameters, JSON::Object &json_result)
|
||||
{
|
||||
OSRM_pimpl_->RunQuery(route_parameters, reply);
|
||||
return OSRM_pimpl_->RunQuery(route_parameters, json_result);
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ class BasePlugin;
|
||||
namespace http { class Reply; }
|
||||
struct RouteParameters;
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
#include <osrm/server_paths.hpp>
|
||||
|
||||
#include "../data_structures/query_edge.hpp"
|
||||
@ -52,7 +53,7 @@ class OSRM_impl
|
||||
OSRM_impl(ServerPaths paths, const bool use_shared_memory);
|
||||
OSRM_impl(const OSRM_impl &) = delete;
|
||||
virtual ~OSRM_impl();
|
||||
void RunQuery(RouteParameters &route_parameters, http::Reply &reply);
|
||||
int RunQuery(RouteParameters &route_parameters, JSON::Object &json_result);
|
||||
|
||||
private:
|
||||
void RegisterPlugin(BasePlugin *plugin);
|
||||
|
@ -35,6 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "../Util/json_renderer.hpp"
|
||||
#include "../Util/simple_logger.hpp"
|
||||
#include "../Util/string_util.hpp"
|
||||
#include "../Util/xml_renderer.hpp"
|
||||
#include "../typedefs.h"
|
||||
|
||||
#include <osrm/route_parameters.hpp>
|
||||
@ -84,13 +85,14 @@ void RequestHandler::handle_request(const http::Request &req, http::Reply &reply
|
||||
auto iter = request.begin();
|
||||
const bool result = boost::spirit::qi::parse(iter, request.end(), api_parser);
|
||||
|
||||
JSON::Object json_result;
|
||||
// check if the was an error with the request
|
||||
if (!result || (iter != request.end()))
|
||||
{
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
reply.content.clear();
|
||||
const auto position = std::distance(request.begin(), iter);
|
||||
JSON::Object json_result;
|
||||
|
||||
json_result.values["status"] = 400;
|
||||
std::string message = "Query string malformed close to position ";
|
||||
message += cast::integral_to_string(position);
|
||||
@ -107,29 +109,32 @@ void RequestHandler::handle_request(const http::Request &req, http::Reply &reply
|
||||
const std::string json_p = (route_parameters.jsonp_parameter + "(");
|
||||
reply.content.insert(reply.content.end(), json_p.begin(), json_p.end());
|
||||
}
|
||||
routing_machine->RunQuery(route_parameters, reply);
|
||||
if (!route_parameters.jsonp_parameter.empty())
|
||||
{ // append brace to jsonp response
|
||||
reply.content.push_back(')');
|
||||
}
|
||||
routing_machine->RunQuery(route_parameters, json_result);
|
||||
|
||||
// set headers
|
||||
reply.headers.emplace_back("Content-Length", cast::integral_to_string(reply.content.size()));
|
||||
if ("gpx" == route_parameters.output_format)
|
||||
{ // gpx file
|
||||
JSON::gpx_render(reply.content, json_result.values["route"]);
|
||||
reply.headers.emplace_back("Content-Type", "application/gpx+xml; charset=UTF-8");
|
||||
reply.headers.emplace_back("Content-Disposition", "attachment; filename=\"route.gpx\"");
|
||||
}
|
||||
else if (route_parameters.jsonp_parameter.empty())
|
||||
{ // json file
|
||||
JSON::render(reply.content, json_result);
|
||||
reply.headers.emplace_back("Content-Type", "application/json; charset=UTF-8");
|
||||
reply.headers.emplace_back("Content-Disposition", "inline; filename=\"response.json\"");
|
||||
}
|
||||
else
|
||||
{ // jsonp
|
||||
JSON::render(reply.content, json_result);
|
||||
reply.headers.emplace_back("Content-Type", "text/javascript; charset=UTF-8");
|
||||
reply.headers.emplace_back("Content-Disposition", "inline; filename=\"response.js\"");
|
||||
}
|
||||
if (!route_parameters.jsonp_parameter.empty())
|
||||
{ // append brace to jsonp response
|
||||
reply.content.push_back(')');
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
|
@ -32,6 +32,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "../data_structures/raw_route_data.hpp"
|
||||
#include "../typedefs.h"
|
||||
|
||||
#include <osrm/json_container.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
@ -77,8 +79,8 @@ template <class DataFacadeT> class BaseDescriptor
|
||||
BaseDescriptor() {}
|
||||
// Maybe someone can explain the pure virtual destructor thing to me (dennis)
|
||||
virtual ~BaseDescriptor() {}
|
||||
virtual void Run(const RawRouteData &raw_route, http::Reply &reply) = 0;
|
||||
virtual void SetConfig(const DescriptorConfig &config) = 0;
|
||||
virtual void Run(const RawRouteData &, JSON::Object &) = 0;
|
||||
virtual void SetConfig(const DescriptorConfig &) = 0;
|
||||
};
|
||||
|
||||
#endif // DESCRIPTOR_BASE_HPP
|
||||
|
@ -41,7 +41,7 @@ template <class DataFacadeT> class GPXDescriptor final : public BaseDescriptor<D
|
||||
DescriptorConfig config;
|
||||
DataFacadeT *facade;
|
||||
|
||||
void AddRoutePoint(const FixedPointCoordinate &coordinate, JSON::Array &json_result)
|
||||
void AddRoutePoint(const FixedPointCoordinate &coordinate, JSON::Array &json_route)
|
||||
{
|
||||
JSON::Object json_lat;
|
||||
JSON::Object json_lon;
|
||||
@ -59,7 +59,7 @@ template <class DataFacadeT> class GPXDescriptor final : public BaseDescriptor<D
|
||||
json_row.values.push_back(json_lon);
|
||||
JSON::Object entry;
|
||||
entry.values["rtept"] = json_row;
|
||||
json_result.values.push_back(entry);
|
||||
json_route.values.push_back(entry);
|
||||
}
|
||||
|
||||
public:
|
||||
@ -67,13 +67,13 @@ template <class DataFacadeT> class GPXDescriptor final : public BaseDescriptor<D
|
||||
|
||||
void SetConfig(const DescriptorConfig &c) final { config = c; }
|
||||
|
||||
void Run(const RawRouteData &raw_route, http::Reply &reply) final
|
||||
void Run(const RawRouteData &raw_route, JSON::Object &json_result) final
|
||||
{
|
||||
JSON::Array json_result;
|
||||
JSON::Array json_route;
|
||||
if (raw_route.shortest_path_length != INVALID_EDGE_WEIGHT)
|
||||
{
|
||||
AddRoutePoint(raw_route.segment_end_coordinates.front().source_phantom.location,
|
||||
json_result);
|
||||
json_route);
|
||||
|
||||
for (const std::vector<PathData> &path_data_vector : raw_route.unpacked_path_segments)
|
||||
{
|
||||
@ -81,13 +81,14 @@ template <class DataFacadeT> class GPXDescriptor final : public BaseDescriptor<D
|
||||
{
|
||||
const FixedPointCoordinate current_coordinate =
|
||||
facade->GetCoordinateOfNode(path_data.node);
|
||||
AddRoutePoint(current_coordinate, json_result);
|
||||
AddRoutePoint(current_coordinate, json_route);
|
||||
}
|
||||
}
|
||||
AddRoutePoint(raw_route.segment_end_coordinates.back().target_phantom.location,
|
||||
json_result);
|
||||
json_route);
|
||||
}
|
||||
JSON::gpx_render(reply.content, json_result);
|
||||
// JSON::gpx_render(reply.content, json_route);
|
||||
json_result.values["route"] = json_route;
|
||||
}
|
||||
};
|
||||
#endif // GPX_DESCRIPTOR_HPP
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2014, Project OSRM, Dennis Luxen, others
|
||||
Copyright (c) 2013, Project OSRM, Dennis Luxen, others
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
@ -99,15 +99,14 @@ template <class DataFacadeT> class JSONDescriptor final : public BaseDescriptor<
|
||||
return added_element_count;
|
||||
}
|
||||
|
||||
void Run(const RawRouteData &raw_route, http::Reply &reply) final
|
||||
void Run(const RawRouteData &raw_route, JSON::Object &json_result) final
|
||||
{
|
||||
JSON::Object json_result;
|
||||
if (INVALID_EDGE_WEIGHT == raw_route.shortest_path_length)
|
||||
{
|
||||
// We do not need to do much, if there is no route ;-)
|
||||
json_result.values["status"] = 207;
|
||||
json_result.values["status_message"] = "Cannot find route between points";
|
||||
JSON::render(reply.content, json_result);
|
||||
// JSON::render(reply.content, json_result);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -296,10 +295,10 @@ template <class DataFacadeT> class JSONDescriptor final : public BaseDescriptor<
|
||||
json_result.values["hint_data"] = json_hint_object;
|
||||
|
||||
// render the content to the output array
|
||||
TIMER_START(route_render);
|
||||
JSON::render(reply.content, json_result);
|
||||
TIMER_STOP(route_render);
|
||||
SimpleLogger().Write(logDEBUG) << "rendering took: " << TIMER_MSEC(route_render);
|
||||
// TIMER_START(route_render);
|
||||
// JSON::render(reply.content, json_result);
|
||||
// TIMER_STOP(route_render);
|
||||
// SimpleLogger().Write(logDEBUG) << "rendering took: " << TIMER_MSEC(route_render);
|
||||
}
|
||||
|
||||
// TODO: reorder parameters
|
||||
@ -356,7 +355,7 @@ template <class DataFacadeT> class JSONDescriptor final : public BaseDescriptor<
|
||||
json_instruction_row.values.push_back(
|
||||
cast::integral_to_string(static_cast<unsigned>(segment.length)) + "m");
|
||||
const double bearing_value = (segment.bearing / 10.);
|
||||
json_instruction_row.values.push_back(Bearing::Get(bearing_value));
|
||||
json_instruction_row.values.push_back(Azimuth::Get(bearing_value));
|
||||
json_instruction_row.values.push_back(
|
||||
static_cast<unsigned>(round(bearing_value)));
|
||||
json_instruction_row.values.push_back(segment.travel_mode);
|
||||
@ -386,10 +385,10 @@ template <class DataFacadeT> class JSONDescriptor final : public BaseDescriptor<
|
||||
json_last_instruction_row.values.push_back(necessary_segments_running_index - 1);
|
||||
json_last_instruction_row.values.push_back(0);
|
||||
json_last_instruction_row.values.push_back("0m");
|
||||
json_last_instruction_row.values.push_back(Bearing::Get(0.0));
|
||||
json_last_instruction_row.values.push_back(Azimuth::Get(0.0));
|
||||
json_last_instruction_row.values.push_back(0.);
|
||||
json_instruction_array.values.push_back(json_last_instruction_row);
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* JSON_DESCRIPTOR_HPP */
|
||||
#endif /* JSON_DESCRIPTOR_H_ */
|
||||
|
@ -64,12 +64,11 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
|
||||
const std::string GetDescriptor() const final { return descriptor_string; }
|
||||
|
||||
void HandleRequest(const RouteParameters &route_parameters, http::Reply &reply) final
|
||||
int HandleRequest(const RouteParameters &route_parameters, JSON::Object &json_result) final
|
||||
{
|
||||
if (!check_all_coordinates(route_parameters.coordinates))
|
||||
{
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
return 400;
|
||||
}
|
||||
|
||||
const bool checksum_OK = (route_parameters.check_sum == facade->GetCheckSum());
|
||||
@ -103,11 +102,9 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
|
||||
if (!result_table)
|
||||
{
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
return 400;
|
||||
}
|
||||
|
||||
JSON::Object json_object;
|
||||
JSON::Array json_array;
|
||||
const auto number_of_locations = phantom_node_vector.size();
|
||||
for (const auto row : osrm::irange<std::size_t>(0, number_of_locations))
|
||||
@ -118,8 +115,9 @@ template <class DataFacadeT> class DistanceTablePlugin final : public BasePlugin
|
||||
json_row.values.insert(json_row.values.end(), row_begin_iterator, row_end_iterator);
|
||||
json_array.values.push_back(json_row);
|
||||
}
|
||||
json_object.values["distance_table"] = json_array;
|
||||
JSON::render(reply.content, json_object);
|
||||
json_result.values["distance_table"] = json_array;
|
||||
// JSON::render(reply.content, json_object);
|
||||
return 200;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -48,11 +48,8 @@ class HelloWorldPlugin final : public BasePlugin
|
||||
virtual ~HelloWorldPlugin() {}
|
||||
const std::string GetDescriptor() const final { return descriptor_string; }
|
||||
|
||||
void HandleRequest(const RouteParameters &routeParameters, http::Reply &reply) final
|
||||
int HandleRequest(const RouteParameters &routeParameters, JSON::Object &json_result) final
|
||||
{
|
||||
reply.status = http::Reply::ok;
|
||||
|
||||
JSON::Object json_result;
|
||||
std::string temp_string;
|
||||
json_result.values["title"] = "Hello World";
|
||||
|
||||
@ -98,8 +95,7 @@ class HelloWorldPlugin final : public BasePlugin
|
||||
++counter;
|
||||
}
|
||||
json_result.values["hints"] = json_hints;
|
||||
|
||||
JSON::render(reply.content, json_result);
|
||||
return 200;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -44,16 +44,14 @@ template <class DataFacadeT> class LocatePlugin final : public BasePlugin
|
||||
explicit LocatePlugin(DataFacadeT *facade) : descriptor_string("locate"), facade(facade) {}
|
||||
const std::string GetDescriptor() const final { return descriptor_string; }
|
||||
|
||||
void HandleRequest(const RouteParameters &route_parameters, http::Reply &reply) final
|
||||
int HandleRequest(const RouteParameters &route_parameters, JSON::Object &json_result) final
|
||||
{
|
||||
// check number of parameters
|
||||
if (route_parameters.coordinates.empty() || !route_parameters.coordinates.front().is_valid())
|
||||
{
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
return 400;
|
||||
}
|
||||
|
||||
JSON::Object json_result;
|
||||
FixedPointCoordinate result;
|
||||
if (!facade->LocateClosestEndPointForCoordinate(route_parameters.coordinates.front(),
|
||||
result))
|
||||
@ -62,15 +60,13 @@ template <class DataFacadeT> class LocatePlugin final : public BasePlugin
|
||||
}
|
||||
else
|
||||
{
|
||||
reply.status = http::Reply::ok;
|
||||
json_result.values["status"] = 0;
|
||||
JSON::Array json_coordinate;
|
||||
json_coordinate.values.push_back(result.lat / COORDINATE_PRECISION);
|
||||
json_coordinate.values.push_back(result.lon / COORDINATE_PRECISION);
|
||||
json_result.values["mapped_coordinate"] = json_coordinate;
|
||||
}
|
||||
|
||||
JSON::render(reply.content, json_result);
|
||||
return 200;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -49,13 +49,12 @@ template <class DataFacadeT> class NearestPlugin final : public BasePlugin
|
||||
|
||||
const std::string GetDescriptor() const final { return descriptor_string; }
|
||||
|
||||
void HandleRequest(const RouteParameters &route_parameters, http::Reply &reply) final
|
||||
int HandleRequest(const RouteParameters &route_parameters, JSON::Object &json_result) final
|
||||
{
|
||||
// check number of parameters
|
||||
if (route_parameters.coordinates.empty() || !route_parameters.coordinates.front().is_valid())
|
||||
{
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
return 400;
|
||||
}
|
||||
auto number_of_results = static_cast<std::size_t>(route_parameters.num_results);
|
||||
std::vector<PhantomNode> phantom_node_vector;
|
||||
@ -63,14 +62,13 @@ template <class DataFacadeT> class NearestPlugin final : public BasePlugin
|
||||
phantom_node_vector,
|
||||
static_cast<int>(number_of_results));
|
||||
|
||||
JSON::Object json_result;
|
||||
if (phantom_node_vector.empty() || !phantom_node_vector.front().is_valid())
|
||||
{
|
||||
json_result.values["status"] = 207;
|
||||
}
|
||||
else
|
||||
{
|
||||
reply.status = http::Reply::ok;
|
||||
// reply.status = http::Reply::ok;
|
||||
json_result.values["status"] = 0;
|
||||
|
||||
if (number_of_results > 1)
|
||||
@ -107,7 +105,7 @@ template <class DataFacadeT> class NearestPlugin final : public BasePlugin
|
||||
json_result.values["name"] = temp_string;
|
||||
}
|
||||
}
|
||||
JSON::render(reply.content, json_result);
|
||||
return 200;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -28,10 +28,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef BASEPLUGIN_H_
|
||||
#define BASEPLUGIN_H_
|
||||
|
||||
// remove
|
||||
#include "../Server/Http/Reply.h"
|
||||
|
||||
#include <osrm/coordinate.hpp>
|
||||
#include <osrm/json_container.hpp>
|
||||
#include <osrm/route_parameters.hpp>
|
||||
|
||||
#include <string>
|
||||
@ -44,8 +42,8 @@ class BasePlugin
|
||||
// Maybe someone can explain the pure virtual destructor thing to me (dennis)
|
||||
virtual ~BasePlugin() {}
|
||||
virtual const std::string GetDescriptor() const = 0;
|
||||
virtual void HandleRequest(const RouteParameters &routeParameters, http::Reply &reply) = 0;
|
||||
virtual bool check_all_coordinates(const std::vector<FixedPointCoordinate> coordinates) const final
|
||||
virtual int HandleRequest(const RouteParameters &, JSON::Object &) = 0;
|
||||
virtual bool check_all_coordinates(const std::vector<FixedPointCoordinate> &coordinates) const final
|
||||
{
|
||||
if (2 > coordinates.size() ||
|
||||
std::any_of(std::begin(coordinates),
|
||||
|
@ -44,14 +44,12 @@ template <class DataFacadeT> class TimestampPlugin final : public BasePlugin
|
||||
{
|
||||
}
|
||||
const std::string GetDescriptor() const final { return descriptor_string; }
|
||||
void HandleRequest(const RouteParameters &route_parameters, http::Reply &reply) final
|
||||
int HandleRequest(const RouteParameters &route_parameters, JSON::Object &json_result) final
|
||||
{
|
||||
reply.status = http::Reply::ok;
|
||||
JSON::Object json_result;
|
||||
json_result.values["status"] = 0;
|
||||
const std::string timestamp = facade->GetTimestamp();
|
||||
json_result.values["timestamp"] = timestamp;
|
||||
JSON::render(reply.content, json_result);
|
||||
return 200;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -71,14 +71,12 @@ template <class DataFacadeT> class ViaRoutePlugin final : public BasePlugin
|
||||
|
||||
const std::string GetDescriptor() const final { return descriptor_string; }
|
||||
|
||||
void HandleRequest(const RouteParameters &route_parameters, http::Reply &reply) final
|
||||
int HandleRequest(const RouteParameters &route_parameters, JSON::Object &json_result) final
|
||||
{
|
||||
if (!check_all_coordinates(route_parameters.coordinates))
|
||||
{
|
||||
reply = http::Reply::StockReply(http::Reply::badRequest);
|
||||
return;
|
||||
return 400;
|
||||
}
|
||||
reply.status = http::Reply::ok;
|
||||
|
||||
std::vector<phantom_node_pair> phantom_node_pair_list(route_parameters.coordinates.size());
|
||||
const bool checksum_OK = (route_parameters.check_sum == facade->GetCheckSum());
|
||||
@ -185,7 +183,8 @@ template <class DataFacadeT> class ViaRoutePlugin final : public BasePlugin
|
||||
}
|
||||
|
||||
descriptor->SetConfig(route_parameters);
|
||||
descriptor->Run(raw_route, reply);
|
||||
descriptor->Run(raw_route, json_result);
|
||||
return 200;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user