@@ -6,9 +6,9 @@ import _ from 'lodash'
6
6
7
7
angular . module ( 'tc.skill-picker' ) . controller ( 'SkillPickerController' , SkillPickerController )
8
8
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' ]
10
10
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 ) {
12
12
var vm = this
13
13
vm . ASSET_PREFIX = CONSTANTS . ASSET_PREFIX
14
14
vm . IOS_PROGRAM_ID = CONSTANTS . SWIFT_PROGRAM_ID
@@ -32,7 +32,6 @@ import _ from 'lodash'
32
32
* Activates the controller.
33
33
*/
34
34
function activate ( ) {
35
- addToMailingList ( )
36
35
initCommunities ( )
37
36
checkCommunityStatus ( )
38
37
}
@@ -138,25 +137,6 @@ import _ from 'lodash'
138
137
}
139
138
}
140
139
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
-
160
140
/**
161
141
* Persists the user's altered information.
162
142
*/
0 commit comments