linking accounts now works.

bug, need to change how loopback generates provider string.
This commit is contained in:
Berkeley Martinez
2015-08-12 16:25:52 -07:00
parent a4e220e2bc
commit fc29c1fd9b
7 changed files with 80 additions and 8 deletions

View File

@@ -1,8 +1,10 @@
var Rx = require('rx');
var debug = require('debug')('freecc:user:remote');
import { Observable } from 'rx';
import debugFactory from 'debug';
const debug = debugFactory('freecc:user:remote');
function destroyAllRelated(id, Model) {
return Rx.Observable.fromNodeCallback(
return Observable.fromNodeCallback(
Model.destroyAll,
Model
)({ userId: id });
@@ -19,7 +21,7 @@ module.exports = function(app) {
if (!id) {
return next();
}
Rx.Observable.combineLatest(
Observable.combineLatest(
destroyAllRelated(id, UserIdentity),
destroyAllRelated(id, UserCredential),
function(identData, credData) {