From bb7117ca0fb18a3fc26ae5b6db15993aeb1b494a Mon Sep 17 00:00:00 2001 From: Chris Miles Date: Fri, 28 Sep 2018 20:04:03 -0500 Subject: [PATCH] Update dhcp_config_save.js --- routes/dhcp_config_save.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/routes/dhcp_config_save.js b/routes/dhcp_config_save.js index 67342c8..115ffb9 100644 --- a/routes/dhcp_config_save.js +++ b/routes/dhcp_config_save.js @@ -3,14 +3,16 @@ */ var express = require('express'); -var router = express.Router(); +var router = express.Router(); + var authorize = require('../core/authorize.js'); router.post('/', authorize.auth, function(req, res, next) { var request = req.body; - + var fs = require('fs'); + fs.writeFileSync("./syntax_verify_config", request.dhcp_config_data, 'utf8'); var exec = require('child_process').exec; @@ -59,4 +61,4 @@ router.post('/', authorize.auth, function(req, res, next) { }); }); -module.exports = router; \ No newline at end of file +module.exports = router;