2017-09-02 14:07:30 +02:00
|
|
|
var express = require('express');
|
|
|
|
var router = express.Router();
|
|
|
|
var fs = require('fs');
|
2018-08-14 10:45:48 +02:00
|
|
|
var template_render = require('../core/render-template.js');
|
|
|
|
var authorize = require('../core/authorize.js');
|
2017-09-02 14:07:30 +02:00
|
|
|
|
2017-09-06 11:42:05 +02:00
|
|
|
router.post('/', authorize.auth, function(req, res, next) {
|
2017-09-02 14:07:30 +02:00
|
|
|
var request = req.body;
|
|
|
|
res.send(fs.readFileSync("./config_backups/" + request.snapshot, 'utf8'));
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = router;
|