From 7489e91f07d22e1309fa5a1d2b73d9d210f34e14 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sat, 24 Jul 2021 12:54:10 -0500 Subject: [PATCH] Move functions folder to default --- netlify/functions/story-image-axis-svg.js | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 netlify/functions/story-image-axis-svg.js diff --git a/netlify/functions/story-image-axis-svg.js b/netlify/functions/story-image-axis-svg.js new file mode 100644 index 0000000..3ff5027 --- /dev/null +++ b/netlify/functions/story-image-axis-svg.js @@ -0,0 +1,60 @@ +exports.handler = async function(event, context) { + const { + //path, // Path parameter + //httpMethod, // Incoming request’s method name + // headers, // {Incoming request headers} + queryStringParameters, // {query string parameters } + // body, // A JSON string of the request payload + // isBase64Encoded, // A boolean flag to indicate if the applicable request payload is Base64-encode + } = event + + // console.log('queryStringParameters', queryStringParameters) + + const { + width = 200, + height = 100, + heading = 'Does It ARM' + } = queryStringParameters + + return { + statusCode: 200, + headers: { + 'Content-Type': 'image/svg+xml', + }, + body: /* html */` + + + + + + + + + + + + + + + + + + + + + + +
${ heading }
+
+
+ ` + } +}