mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
fix(apigateway): prefer path parameters in VTL lookups (#3560)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
This commit is contained in:
1 parent
1987bf0c96
commit
166b13a82f
3 files changed
+54
-7
No files matched your search
@@ -239,14 +239,14 @@ public class VtlTemplateEngine {
|
||||
}
|
||||
}
|
||||
|
||||
/** Searches all parameter types for the given name (querystring, path, header). */
|
||||
/** Searches all parameter types for the given name (path, querystring, header). */
|
||||
public String params(String paramName) {
|
||||
if (ctx.queryParams() != null && ctx.queryParams().containsKey(paramName)) {
|
||||
return ctx.queryParams().get(paramName);
|
||||
}
|
||||
if (ctx.pathParams() != null && ctx.pathParams().containsKey(paramName)) {
|
||||
return ctx.pathParams().get(paramName);
|
||||
}
|
||||
if (ctx.queryParams() != null && ctx.queryParams().containsKey(paramName)) {
|
||||
return ctx.queryParams().get(paramName);
|
||||
}
|
||||
if (ctx.headers() != null && ctx.headers().containsKey(paramName)) {
|
||||
return ctx.headers().get(paramName);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user