Created
July 16, 2018 11:14
-
-
Save didil/b72efaab315610adab5a881a4935377b to your computer and use it in GitHub Desktop.
asyncConcat lambda handler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jsonResponse = require("../lib/jsonResponse"); | |
const asyncConcatService = require("../lib/asyncConcatService"); | |
module.exports.handler = async (event, context) => { | |
let { a, b } = event.queryStringParameters; | |
if (!a || !b) { | |
return jsonResponse.error({ | |
message: "Please specify 2 strings a and b to concatenate" | |
}); | |
} | |
let result = await asyncConcatService.concat(a, b); | |
return jsonResponse.ok({ result }); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment