diff --git a/server/boot/authentication.js b/server/boot/authentication.js index 37bfbd3d6e..eac0e68b8b 100644 --- a/server/boot/authentication.js +++ b/server/boot/authentication.js @@ -138,7 +138,7 @@ module.exports = function enableAuthentication(app) { } ); } - return authToken.validate() + return authToken.validate$() .map(isValid => { if (!isValid) { throw wrapHandledError( @@ -153,7 +153,7 @@ module.exports = function enableAuthentication(app) { } ); } - return authToken.destroy(); + return authToken.destroy$(); }) .map(() => user); }); diff --git a/server/models/auth-token.js b/server/models/auth-token.js index 11200da184..249ef0a8a6 100644 --- a/server/models/auth-token.js +++ b/server/models/auth-token.js @@ -5,10 +5,10 @@ export default function(AuthToken) { AuthToken.findOne$ = Observable.fromNodeCallback( AuthToken.findOne.bind(AuthToken) ); - AuthToken.prototype.validate = Observable.fromNodeCallback( + AuthToken.prototype.validate$ = Observable.fromNodeCallback( AuthToken.prototype.validate ); - AuthToken.prototype.destroy = Observable.fromNodeCallback( + AuthToken.prototype.destroy$ = Observable.fromNodeCallback( AuthToken.prototype.destroy ); });