mirror of https://github.com/Lissy93/dashy.git
✨ Writes a cloud function to wrap the status-check endpoint
This commit is contained in:
parent
c1a18ab9c8
commit
018041d025
|
@ -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,
|
||||
});
|
||||
});
|
||||
};
|
Loading…
Reference in New Issue