config-validator to consider default values from schema (#139)

* config-validator to consider default values from schema

* fix with relative json schema path

* remove lamassuServerPath config on lamassu-migrate-options
This commit is contained in:
Fabio Cigliano 2018-08-14 17:46:09 +02:00 committed by Josh Harvey
parent d28c6ae691
commit 6fdb3e8834
7 changed files with 13 additions and 16 deletions

View file

@ -100,8 +100,10 @@ app.post('/api/account', (req, res) => {
.then(() => dbNotify())
})
app.get('/api/config/:config', (req, res) =>
config.fetchConfigGroup(req.params.config).then(c => res.json(c)))
app.get('/api/config/:config', (req, res, next) =>
config.fetchConfigGroup(req.params.config)
.then(c => res.json(c))
.catch(next))
app.post('/api/config', (req, res, next) => {
config.saveConfigGroup(req.body)