From d2130a24a147ff8c31b6f8eea14b854bf1c1f170 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Fri, 5 Jan 2018 10:47:44 +1000 Subject: [PATCH] Fix error when updating hosts --- README.md | 2 -- manager/src/backend/lib/validator/api.js | 2 +- manager/src/backend/schema/endpoints/hosts.json | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3b2b2159..d8286e30 100644 --- a/README.md +++ b/README.md @@ -101,9 +101,7 @@ I won't go in to too much detail here but here are the basics for someone new to ## TODO - Pass on human readable ssl cert errors to the ui -- Allow a host to be a redirection to another domain - UI: Allow column sorting on tables - UI: Allow filtering hosts by types - Advanced option to overwrite the default location block (or regex to do it automatically) - Add nice upstream error pages - diff --git a/manager/src/backend/lib/validator/api.js b/manager/src/backend/lib/validator/api.js index 8df3a7c7..cc44fd8a 100644 --- a/manager/src/backend/lib/validator/api.js +++ b/manager/src/backend/lib/validator/api.js @@ -30,7 +30,7 @@ function apiValidator (schema, payload/*, description*/) { resolve(payload); } else { let message = ajv.errorsText(validate.errors); - //debug(validate.errors); + //console.log(validate.errors); let err = new error.ValidationError(message); err.debug = [validate.errors, payload]; diff --git a/manager/src/backend/schema/endpoints/hosts.json b/manager/src/backend/schema/endpoints/hosts.json index b74b59fa..6e0ed9f9 100644 --- a/manager/src/backend/schema/endpoints/hosts.json +++ b/manager/src/backend/schema/endpoints/hosts.json @@ -146,6 +146,9 @@ "required": [], "additionalProperties": false, "properties": { + "type": { + "$ref": "#/definitions/type" + }, "hostname": { "$ref": "#/definitions/hostname" },