@@ -6,9 +6,9 @@ import _ from 'lodash'
66
77 angular . module ( 'tc.skill-picker' ) . controller ( 'SkillPickerController' , SkillPickerController )
88
9- SkillPickerController . $inject = [ '$scope' , 'CONSTANTS' , 'ProfileService' , '$state' , 'userProfile' , 'featuredSkills' , 'logger' , 'toaster' , 'MemberCertService' , '$q' , 'UserPreferencesService' ]
9+ SkillPickerController . $inject = [ '$scope' , 'CONSTANTS' , 'ProfileService' , '$state' , 'userProfile' , 'featuredSkills' , 'logger' , 'toaster' , 'MemberCertService' , '$q' ]
1010
11- function SkillPickerController ( $scope , CONSTANTS , ProfileService , $state , userProfile , featuredSkills , logger , toaster , MemberCertService , $q , UserPreferencesService ) {
11+ function SkillPickerController ( $scope , CONSTANTS , ProfileService , $state , userProfile , featuredSkills , logger , toaster , MemberCertService , $q ) {
1212 var vm = this
1313 vm . ASSET_PREFIX = CONSTANTS . ASSET_PREFIX
1414 vm . IOS_PROGRAM_ID = CONSTANTS . SWIFT_PROGRAM_ID
@@ -32,7 +32,6 @@ import _ from 'lodash'
3232 * Activates the controller.
3333 */
3434 function activate ( ) {
35- addToMailingList ( )
3635 initCommunities ( )
3736 checkCommunityStatus ( )
3837 }
@@ -138,25 +137,6 @@ import _ from 'lodash'
138137 }
139138 }
140139
141- function addToMailingList ( ) {
142- return UserPreferencesService . getEmailPreferences ( userProfile ) . then ( function ( subscription ) {
143- logger . debug ( subscription )
144- if ( ! subscription ) {
145- return UserPreferencesService . saveEmailPreferences ( userProfile ) . then ( function ( resp ) {
146- logger . debug ( resp )
147- } ) . catch ( function ( err ) {
148- // no error to user
149- //TODO some error alert to community admin
150- logger . debug ( 'error in adding user to member list' )
151- } )
152- }
153- } ) . catch ( function ( err ) {
154- // no error to user
155- //TODO some error alert to community admin
156- logger . debug ( 'error in adding user to member list' )
157- } )
158- }
159-
160140 /**
161141 * Persists the user's altered information.
162142 */
0 commit comments