From 60189e242849be1f4f394317ddd36eb972b942ed Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 12 Aug 2015 20:05:06 -0700 Subject: [PATCH 1/2] fix angular.js typo closes #1287 --- challenges/angularjs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/angularjs.json b/challenges/angularjs.json index ba6071a1fd..304e86ed3c 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." ], From 30070c4f747a65bd5730b2c91e2e6328966fdf89 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 12 Aug 2015 20:30:08 -0700 Subject: [PATCH 2/2] fix loopback migration to new auth scheme closes #1735 --- loopbackMigration.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/loopbackMigration.js b/loopbackMigration.js index d167ccec8b..e300bd217b 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 }; })