Refactor calls to ussd service.
This commit is contained in:
parent
cef7b8dc04
commit
9782c919d5
@ -52,7 +52,7 @@ export class UserService {
|
||||
|
||||
resetPin(phone: string): Observable<any> {
|
||||
const params: HttpParams = new HttpParams().set('phoneNumber', phone);
|
||||
return this.httpClient.get(`${environment.cicUssdUrl}/pin`, { params });
|
||||
return this.httpClient.put(`${environment.cicUssdUrl}/pin`, { params });
|
||||
}
|
||||
|
||||
getAccountStatus(phone: string): Observable<any> {
|
||||
|
@ -109,8 +109,6 @@ export class AccountDetailsComponent implements OnInit {
|
||||
this.account = res;
|
||||
this.cdr.detectChanges();
|
||||
this.loggingService.sendInfoLevelMessage(this.account);
|
||||
// this.userService.getAccountStatus(this.account.vcard?.tel[0].value).pipe(first())
|
||||
// .subscribe(response => this.accountStatus = response);
|
||||
this.accountInfoForm.patchValue({
|
||||
name: this.account.vcard?.fn[0].value,
|
||||
phoneNumber: this.account.vcard?.tel[0].value,
|
||||
@ -123,6 +121,8 @@ export class AccountDetailsComponent implements OnInit {
|
||||
location: this.account.location.area,
|
||||
locationType: this.account.location.area_type,
|
||||
});
|
||||
this.userService.getAccountStatus(this.account.vcard?.tel[0].value).pipe(first())
|
||||
.subscribe(response => this.accountStatus = response.status);
|
||||
} else {
|
||||
alert('Account not found!');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user