Merge pull request #943 from BerkeleyTrue/refactor/user-remote-method
Use User.remoteMethod instead of loopbacks method
This commit is contained in:
commit
e0e9d6ecff
|
@ -318,7 +318,7 @@ module.exports = function(User) {
|
|||
options.port +
|
||||
options.restApiRoot +
|
||||
userModel.http.path +
|
||||
userModel.confirm.http.path +
|
||||
userModel.sharedClass.find('confirm', true).http.path +
|
||||
'?uid=' +
|
||||
options.user.id +
|
||||
'&redirect=' +
|
||||
|
@ -496,8 +496,8 @@ module.exports = function(User) {
|
|||
next();
|
||||
});
|
||||
|
||||
loopback.remoteMethod(
|
||||
UserModel.login,
|
||||
UserModel.remoteMethod(
|
||||
'login',
|
||||
{
|
||||
description: 'Login a user with username/email and password',
|
||||
accepts: [
|
||||
|
@ -518,8 +518,8 @@ module.exports = function(User) {
|
|||
}
|
||||
);
|
||||
|
||||
loopback.remoteMethod(
|
||||
UserModel.logout,
|
||||
UserModel.remoteMethod(
|
||||
'logout',
|
||||
{
|
||||
description: 'Logout a user with access token',
|
||||
accepts: [
|
||||
|
@ -537,8 +537,8 @@ module.exports = function(User) {
|
|||
}
|
||||
);
|
||||
|
||||
loopback.remoteMethod(
|
||||
UserModel.confirm,
|
||||
UserModel.remoteMethod(
|
||||
'confirm',
|
||||
{
|
||||
description: 'Confirm a user registration with email verification token',
|
||||
accepts: [
|
||||
|
@ -550,8 +550,8 @@ module.exports = function(User) {
|
|||
}
|
||||
);
|
||||
|
||||
loopback.remoteMethod(
|
||||
UserModel.resetPassword,
|
||||
UserModel.remoteMethod(
|
||||
'resetPassword',
|
||||
{
|
||||
description: 'Reset password for a user with email',
|
||||
accepts: [
|
||||
|
|
Loading…
Reference in New Issue