|
|
|
@ -1,11 +1,15 @@
|
|
|
|
|
import Settings, { SETTINGS_FILE } from '../../data/Settings';
|
|
|
|
|
import Auth from '../../data/Auth';
|
|
|
|
|
var express = require('express');
|
|
|
|
|
var router = express.Router();
|
|
|
|
|
var nodemailer = require('nodemailer');
|
|
|
|
|
var mg = require('nodemailer-mailgun-transport');
|
|
|
|
|
const pug = require('pug');
|
|
|
|
|
const settings = new Settings();
|
|
|
|
|
const auth = new Auth();
|
|
|
|
|
router.post('/', function (req, res) {
|
|
|
|
|
auth.authCheck(req)
|
|
|
|
|
.then(() => {
|
|
|
|
|
settings
|
|
|
|
|
.load(SETTINGS_FILE)
|
|
|
|
|
.then(settings => {
|
|
|
|
@ -71,5 +75,9 @@ router.post('/', function (req, res) {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
//console.error(err);
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(err => {
|
|
|
|
|
res.json(err);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
module.exports = router;
|
|
|
|
|