Skip to content

Commit

Permalink
fix: decode base64 properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrconley committed Apr 29, 2020
1 parent 874ae35 commit 6152199
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "valory-adaptor-alb",
"version": "2.0.0-beta.5",
"version": "2.0.0-beta.6",
"main": "dist/albAdaptor.js",
"typings": "dist/albAdaptor.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/albAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class ALBAdaptor implements ApiAdaptor {

public register(path: string, method: HttpMethod, handler: (ctx: ApiContext) => Promise<ApiContext>) {
this.router.on(method, path.replace(pathReplacer, ":$1"), async (request, callback, params) => {
const content = (request.isBase64Encoded) ? Buffer.from("base64").toString() : request.body;
const content = (request.isBase64Encoded) ? Buffer.from(request.body, "base64").toString() : request.body;
const tranRequest = new ApiContext({
headers: request.headers,
pathParams: params,
Expand Down

0 comments on commit 6152199

Please sign in to comment.