mirror of
https://github.com/Lissy93/dashy.git
synced 2025-04-08 17:06:18 +02:00
✨ Writes a cloud function to wrap the status-check endpoint
This commit is contained in:
parent
c1a18ab9c8
commit
018041d025
12
services/serverless-functions/cloud-status-check.js
Normal file
12
services/serverless-functions/cloud-status-check.js
Normal 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,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user