Writes a cloud function to wrap the status-check endpoint

This commit is contained in:
Alicia Sykes 2021-09-18 21:36:20 +01:00
parent c1a18ab9c8
commit 018041d025
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
/* A cloud function that wraps the status checking method, for use on Netlify */
const statusCheck = require('../status-check');
exports.handler = (event, context, callback) => {
const paramStr = event.rawQuery;
statusCheck(paramStr, (results) => {
callback(null, {
statusCode: 200,
body: results,
});
});
};