send values directly

v1.18.x
barisusakli 11 years ago
parent f235c86a0a
commit 770e0a67c1

@ -9,9 +9,7 @@ define(function() {
$('#reset').on('click', function() {
if (inputEl.val() && inputEl.val().indexOf('@') !== -1) {
socket.emit('user.reset.send', {
email: inputEl.val()
}, function(err, data) {
socket.emit('user.reset.send', inputEl.val(), function(err, data) {
if(err) {
return app.alertError(err.message);
}

@ -35,9 +35,7 @@ define(function() {
}
});
socket.emit('user.reset.valid', {
code: reset_code
}, function(err, valid) {
socket.emit('user.reset.valid', reset_code, function(err, valid) {
if(err) {
return app.alertError(err.message);
}

@ -30,15 +30,15 @@ SocketUser.search = function(socket, username, callback) {
// Password Reset
SocketUser.reset = {};
SocketUser.reset.send = function(socket, data, callback) {
if(data && data.email) {
user.reset.send(socket, data.email, callback);
SocketUser.reset.send = function(socket, email, callback) {
if (email) {
user.reset.send(socket, email, callback);
}
};
SocketUser.reset.valid = function(socket, data, callback) {
if(data && data.code) {
user.reset.validate(socket, data.code, callback);
SocketUser.reset.valid = function(socket, code, callback) {
if (code) {
user.reset.validate(socket, code, callback);
}
};

Loading…
Cancel
Save