From 91f6c0a57a2791f6ecbdf5ce6544268b2d716d36 Mon Sep 17 00:00:00 2001 From: velvettear Date: Mon, 21 Feb 2022 12:20:18 +0100 Subject: [PATCH] extended config and server accordingly --- config.json | 5 +++++ libs/server.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/config.json b/config.json index 7710b7f..135fd37 100644 --- a/config.json +++ b/config.json @@ -22,6 +22,11 @@ "default": "random", "description": "specifies the color to change to" }, + "index": { + "available": "number values", + "default": "undefined", + "description": "specifies the led index" + }, "duration": { "available": "number values", "default": 1000, diff --git a/libs/server.js b/libs/server.js index 7fe3e9f..56c7dce 100644 --- a/libs/server.js +++ b/libs/server.js @@ -44,13 +44,16 @@ function getHTML() { "argument" + "available values" + "default" + + "restrictions" + "description"; Object.keys(config.api.post).forEach(function (argument) { + let restrictions = config.api.post[argument].restrictions || ""; welcomeMessage += "" + "" + argument + "" + "" + config.api.post[argument].available + "" + "" + config.api.post[argument].default + "" + + "" + restrictions + "" + "" + config.api.post[argument].description + "" + ""; });