This commit is contained in:
2020-04-10 17:04:50 -04:00
parent 0c337716d3
commit 5266aec2b1
14 changed files with 300 additions and 244 deletions

View File

@ -30,7 +30,8 @@ router.get('/', async function(req, res, next){
router.put('/:host', async function(req, res, next){
try{
req.body.updated_by = req.user.username;
await Host.update(req.body, req.params.host);
let host = await Host.get(req.params.host);
await host.update(req.body);
return res.json({
message: `Host "${req.params.host}" updated.`