diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-09-11 12:40:17 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-09-11 12:40:41 +0100 |
commit | db5557781407a8f58eaabeaffad706b8c777bdab (patch) | |
tree | 5607d1cc490e08f45be8d430d30815c1d8932dbd | |
parent | No need to proxy getProxy through route handler now we have a core instance (diff) | |
download | icespider-db5557781407a8f58eaabeaffad706b8c777bdab.tar.bz2 icespider-db5557781407a8f58eaabeaffad706b8c777bdab.tar.xz icespider-db5557781407a8f58eaabeaffad706b8c777bdab.zip |
Fix defaults in mash up
-rw-r--r-- | icespider/compile/routeCompiler.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/icespider/compile/routeCompiler.cpp b/icespider/compile/routeCompiler.cpp index 6941872..20d5c39 100644 --- a/icespider/compile/routeCompiler.cpp +++ b/icespider/compile/routeCompiler.cpp @@ -456,7 +456,15 @@ namespace IceSpider { auto so = findOperation(o.second->operation, us); for (const auto & p : so->parameters()) { auto po = o.second->paramOverrides.find(p->name()); - fprintbf(output, "_p_%s, ", (po != o.second->paramOverrides.end() ? po->second : p->name())); + auto rp = *std::find_if(r->params.begin(), r->params.end(), [p,po,o](const auto & rp) { + return rp->name == (po != o.second->paramOverrides.end() ? po->second : p->name()); + }); + if (rp->hasUserSource) { + fprintbf(output, "_p_%s, ", p->name()); + } + else { + fprintbf(output, "_pd_%s, ", p->name()); + } } fprintbf(output, "request->getContext());\n"); } |