Revision 59816
Added by Argiro Kokogiannaki over 3 years ago
role-verification.component.ts | ||
---|---|---|
172 | 172 |
|
173 | 173 |
public verifyManager() { |
174 | 174 |
this.loading = true; |
175 |
this.userRegistryService.verify(this.verification.id, this.code.value).subscribe(() => { |
|
175 |
this.subs.push(this.userRegistryService.verify(this.verification.id, this.code.value).subscribe(() => {
|
|
176 | 176 |
this.loading = false; |
177 | 177 |
this.managerModal.cancel(); |
178 | 178 |
this.error = null; |
179 |
this.userManagementService.getUserInfo(false).subscribe(user => { |
|
179 |
this.subs.push(this.userManagementService.getUserInfo(false).subscribe(user => {
|
|
180 | 180 |
this.user = user; |
181 | 181 |
this.router.navigate(['/admin/' + this.verification.entity]); |
182 |
}); |
|
182 |
}));
|
|
183 | 183 |
}, error => { |
184 | 184 |
this.loading = false; |
185 | 185 |
this.error = 'The verification code is invalid'; |
186 |
}); |
|
186 |
}));
|
|
187 | 187 |
} |
188 | 188 |
|
189 | 189 |
public verifyMember() { |
190 | 190 |
this.loading = true; |
191 |
this.userRegistryService.verify(this.verification.id, this.code.value, "member").subscribe(() => { |
|
191 |
this.subs.push(this.userRegistryService.verify(this.verification.id, this.code.value, "member").subscribe(() => {
|
|
192 | 192 |
this.loading = false; |
193 | 193 |
this.error = null; |
194 |
this.userManagementService.getUserInfo(false).subscribe(user => { |
|
194 |
this.subs.push(this.userManagementService.getUserInfo(false).subscribe(user => {
|
|
195 | 195 |
this.user = user; |
196 | 196 |
this.memberModal.cancel(); |
197 |
}); |
|
197 |
}));
|
|
198 | 198 |
}, error => { |
199 | 199 |
this.loading = false; |
200 | 200 |
this.error = 'The verification code is invalid'; |
201 |
}); |
|
201 |
}));
|
|
202 | 202 |
} |
203 | 203 |
|
204 | 204 |
public reset() { |
Also available in: Unified diff
[Library|Trunk]
code clean up:
-remove app.* files from library
-remove unused imports, code, files (Old search pages for results, dataproviders, map search page, etc)
-remove Freeguard from modules
-unsubscribe all subscriptions
-Services: configuration, isvocabularies, user management: unsubscribe from app component or the component that uses them (clearSubscriptions())
-Fetchers: unsubscribe from the component that uses them (clearSubscriptions())