Update dhcp_config_save.js
This commit is contained in:
parent
391461eeb1
commit
bb7117ca0f
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue