extended config and server accordingly

This commit is contained in:
Daniel Sommer 2022-02-21 12:20:18 +01:00
parent 047dc92b80
commit 91f6c0a57a
2 changed files with 8 additions and 0 deletions

View file

@ -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,

View file

@ -44,13 +44,16 @@ function getHTML() {
"<th>argument</th>" +
"<th>available values</th>" +
"<th>default</th>" +
"<th>restrictions</th>" +
"<th>description</th>";
Object.keys(config.api.post).forEach(function (argument) {
let restrictions = config.api.post[argument].restrictions || "";
welcomeMessage +=
"<tr>" +
"<td>" + argument + "</td>" +
"<td>" + config.api.post[argument].available + "</td>" +
"<td>" + config.api.post[argument].default + "</td>" +
"<td>" + restrictions + "</td>" +
"<td>" + config.api.post[argument].description + "</td>" +
"</tr>";
});