Update dhcp_config_save.js

This commit is contained in:
Chris Miles 2018-09-28 20:04:03 -05:00 committed by GitHub
parent 391461eeb1
commit bb7117ca0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -3,14 +3,16 @@
*/ */
var express = require('express'); var express = require('express');
var router = express.Router(); var router = express.Router();
var authorize = require('../core/authorize.js'); var authorize = require('../core/authorize.js');
router.post('/', authorize.auth, function(req, res, next) { router.post('/', authorize.auth, function(req, res, next) {
var request = req.body; var request = req.body;
var fs = require('fs');
fs.writeFileSync("./syntax_verify_config", request.dhcp_config_data, 'utf8'); fs.writeFileSync("./syntax_verify_config", request.dhcp_config_data, 'utf8');
var exec = require('child_process').exec; var exec = require('child_process').exec;
@ -59,4 +61,4 @@ router.post('/', authorize.auth, function(req, res, next) {
}); });
}); });
module.exports = router; module.exports = router;