Replace alternateEmail with fallbackEmail
This commit is contained in:
@@ -228,7 +228,7 @@ function feedback(req, res, next) {
|
||||
if (typeof req.body.subject !== 'string' || !req.body.subject) return next(new HttpError(400, 'subject must be string'));
|
||||
if (typeof req.body.description !== 'string' || !req.body.description) return next(new HttpError(400, 'description must be string'));
|
||||
|
||||
appstore.sendFeedback(_.extend(req.body, { email: req.user.alternateEmail || req.user.email, displayName: req.user.displayName }), function (error) {
|
||||
appstore.sendFeedback(_.extend(req.body, { email: req.user.email, displayName: req.user.displayName }), function (error) {
|
||||
if (error && error.reason === AppstoreError.BILLING_REQUIRED) return next(new HttpError(402, 'Login to App Store to create support tickets. You can also email support@cloudron.io'));
|
||||
if (error) return next(new HttpError(503, 'Error contacting cloudron.io. Please email support@cloudron.io'));
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ function get(req, res, next) {
|
||||
id: req.user.id,
|
||||
username: req.user.username,
|
||||
email: req.user.email,
|
||||
alternateEmail: req.user.alternateEmail,
|
||||
fallbackEmail: req.user.fallbackEmail,
|
||||
admin: req.user.admin,
|
||||
displayName: req.user.displayName
|
||||
}));
|
||||
|
||||
@@ -56,7 +56,6 @@ function create(req, res, next) {
|
||||
displayName: user.displayName,
|
||||
email: user.email,
|
||||
fallbackEmail: user.fallbackEmail,
|
||||
alternateEmail: user.alternateEmail,
|
||||
admin: user.admin,
|
||||
groupIds: [ ],
|
||||
resetToken: user.resetToken
|
||||
@@ -93,7 +92,7 @@ function list(req, res, next) {
|
||||
if (error) return next(new HttpError(500, error));
|
||||
|
||||
var users = results.map(function (result) {
|
||||
return _.pick(result, 'id', 'username', 'email', 'fallbackEmail', 'alternateEmail', 'displayName', 'groupIds', 'admin');
|
||||
return _.pick(result, 'id', 'username', 'email', 'fallbackEmail', 'displayName', 'groupIds', 'admin');
|
||||
});
|
||||
|
||||
next(new HttpSuccess(200, { users: users }));
|
||||
@@ -116,7 +115,6 @@ function get(req, res, next) {
|
||||
displayName: result.displayName,
|
||||
email: result.email,
|
||||
fallbackEmail: result.fallbackEmail,
|
||||
alternateEmail: result.alternateEmail,
|
||||
admin: result.admin,
|
||||
groupIds: result.groupIds
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user