The requested function is in mailer
This commit is contained in:
@@ -32,7 +32,6 @@ var apps = require('./apps.js'),
|
|||||||
debug = require('debug')('box:cloudron'),
|
debug = require('debug')('box:cloudron'),
|
||||||
fs = require('fs'),
|
fs = require('fs'),
|
||||||
locker = require('./locker.js'),
|
locker = require('./locker.js'),
|
||||||
mailer = require('./mailer.js'),
|
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
paths = require('./paths.js'),
|
paths = require('./paths.js'),
|
||||||
progress = require('./progress.js'),
|
progress = require('./progress.js'),
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ var assert = require('assert'),
|
|||||||
cloudron = require('../cloudron.js'),
|
cloudron = require('../cloudron.js'),
|
||||||
config = require('../config.js'),
|
config = require('../config.js'),
|
||||||
progress = require('../progress.js'),
|
progress = require('../progress.js'),
|
||||||
|
mailer = require('../mailer.js'),
|
||||||
CloudronError = cloudron.CloudronError,
|
CloudronError = cloudron.CloudronError,
|
||||||
debug = require('debug')('box:routes/cloudron'),
|
debug = require('debug')('box:routes/cloudron'),
|
||||||
HttpError = require('connect-lastmile').HttpError,
|
HttpError = require('connect-lastmile').HttpError,
|
||||||
@@ -166,7 +167,7 @@ function feedback(req, res, next) {
|
|||||||
if (typeof req.body.subject !== 'string') return next(new HttpError(400, 'subject must be string'));
|
if (typeof req.body.subject !== 'string') return next(new HttpError(400, 'subject must be string'));
|
||||||
if (typeof req.body.description !== 'string') return next(new HttpError(400, 'description must be string'));
|
if (typeof req.body.description !== 'string') return next(new HttpError(400, 'description must be string'));
|
||||||
|
|
||||||
cloudron.feedback(req.user, req.body.type, req.body.subject, req.body.description, function (error) {
|
mailer.sendFeedback(req.user, req.body.type, req.body.subject, req.body.description, function (error) {
|
||||||
if (error) return next(new HttpError(500, error));
|
if (error) return next(new HttpError(500, error));
|
||||||
next(new HttpSuccess(201, {}));
|
next(new HttpSuccess(201, {}));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user