diff --git a/challenges/angularjs.json b/challenges/angularjs.json index ba6071a1fd5..304e86ed3c9 100644 --- a/challenges/angularjs.json +++ b/challenges/angularjs.json @@ -32,7 +32,7 @@ "difficulty": 0.35, "challengeSeed": ["114684727"], "description": [ - "Directives serve as markers in your HTML. When Angular.js compiles your HTML, it will can alter the behavior of DOM elements based on the directives you've used.", + "Directives serve as markers in your HTML. When Angular.js compiles your HTML, it will alter the behavior of DOM elements based on the directives you've used.", "Let's learn how these powerful directives work, and how to use them to make your web apps more dynamic", "Go to http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/2/section/1/video/1 and complete the section." ], diff --git a/loopbackMigration.js b/loopbackMigration.js index d167ccec8b0..e300bd217bb 100644 --- a/loopbackMigration.js +++ b/loopbackMigration.js @@ -86,15 +86,19 @@ var users = dbObservable .map(function(user) { // flatten user assign(user, user.portfolio, user.profile); - if (user.username) { - return user; + if (!user.username) { + user.username = 'fcc' + uuid.v4().slice(0, 8); } - user.username = 'fcc' + uuid.v4().slice(0, 8); if (user.github) { user.isGithubCool = true; } else { user.isMigrationGrandfathered = true; } + providers.forEach(function(provider) { + user[provider + 'id'] = user[provider]; + user[provider] = null; + }); + return user; }) .shareReplay(); @@ -123,7 +127,7 @@ var userIdentityCount = users .map(function(provider) { return { provider: provider, - externalId: user[provider], + externalId: user[provider + 'id'], userId: user._id || user.id }; })