mirror of
https://github.com/Lissy93/dashy.git
synced 2025-12-06 08:34:14 +01:00
✨ Writes a cloud function to wrap the status-check endpoint
This commit is contained in:
parent
c1a18ab9c8
commit
018041d025
1 changed files with 12 additions and 0 deletions
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…
Reference in a new issue