Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:sparkles: Writes a cloud function to wrap the status-check endpoint

Alicia Sykes018041d025de
diff --git a/services/serverless-functions/cloud-status-check.js b/services/serverless-functions/cloud-status-check.js
new file mode 100644
index 00000000..4959bc93
--- /dev/null
+++ b/services/serverless-functions/cloud-status-check.js
@@ -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,
+ });
+ });
+};