refactor: Update methods to sensible names

This commit is contained in:
Mrugesh Mohapatra
2017-10-21 04:58:53 +05:30
parent 2a3703b95a
commit 9ccfe4f72c
4 changed files with 7 additions and 7 deletions

View File

@@ -472,7 +472,7 @@ module.exports = function(User) {
}
);
User.requestAuthLink = function requestAuthLink(email) {
User.requestAuthEmail = function requestAuthEmail(email) {
if (!isEmail(email)) {
return Promise.reject(
new Error('The submitted email not valid.')
@@ -545,7 +545,7 @@ module.exports = function(User) {
};
User.remoteMethod(
'requestAuthLink',
'requestAuthEmail',
{
description: 'request a link on email with temporary token to sign in',
accepts: [{
@@ -560,7 +560,7 @@ module.exports = function(User) {
}
);
User.prototype.updateEmail = function updateEmail(email) {
User.prototype.requestUpdateEmail = function requestUpdateEmail(email) {
const ownEmail = email === this.email;
if (!isEmail('' + email)) {
return Observable.throw(createEmailError());