Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Julian Lam
2017-02-07 16:03:54 -05:00
78 changed files with 649 additions and 367 deletions

View File

@@ -2,6 +2,7 @@
var async = require('async');
var nconf = require('nconf');
var meta = require('../../meta');
var settingsController = module.exports;
@@ -25,7 +26,7 @@ function renderEmail(req, res, next) {
var path = require('path');
var utils = require('../../../public/src/utils');
var emailsPath = path.join(__dirname, '../../../public/templates/emails');
var emailsPath = path.join(nconf.get('views_dir'), 'emails');
async.waterfall([
function (next) {

View File

@@ -105,14 +105,10 @@ uploadsController.uploadSound = function (req, res, next) {
return next(err);
}
var soundsPath = path.join(__dirname, '../../../public/sounds'),
var soundsPath = path.join(__dirname, '../../../build/public/sounds'),
filePath = path.join(__dirname, '../../../public/uploads/sounds', uploadedFile.name);
if (process.platform === 'win32') {
fs.link(filePath, path.join(soundsPath, path.basename(filePath)));
} else {
fs.symlink(filePath, path.join(soundsPath, path.basename(filePath)), 'file');
}
file.link(filePath, path.join(soundsPath, path.basename(filePath)));
fs.unlink(uploadedFile.path, function (err) {
if (err) {