diff --git a/src/app/_services/user.service.ts b/src/app/_services/user.service.ts index ff1adf0..cc9685e 100644 --- a/src/app/_services/user.service.ts +++ b/src/app/_services/user.service.ts @@ -52,7 +52,7 @@ export class UserService { resetPin(phone: string): Observable { 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 { diff --git a/src/app/pages/accounts/account-details/account-details.component.ts b/src/app/pages/accounts/account-details/account-details.component.ts index dedcc42..e7e01f3 100644 --- a/src/app/pages/accounts/account-details/account-details.component.ts +++ b/src/app/pages/accounts/account-details/account-details.component.ts @@ -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!'); }