dynamic + check for statuss 200
This commit is contained in:
@@ -176,7 +176,7 @@ export class CreatePage {
|
||||
this.stopPolling();
|
||||
this.qrPolling.set(true);
|
||||
this.pollHandle = setInterval(() => {
|
||||
this.http.get<QrStatusResponse>(`${QR_VITANOVA_API}/qr/${encodeURIComponent(this.partnerqrID)}/${qrId}/`)
|
||||
this.http.get<QrStatusResponse>(`${QR_VITANOVA_API}/qr/dynamic/${encodeURIComponent(this.partnerqrID)}/${qrId}/`)
|
||||
.subscribe({
|
||||
next: (res) => {
|
||||
const st = res?.status ?? '';
|
||||
@@ -191,7 +191,9 @@ export class CreatePage {
|
||||
}
|
||||
// REGISTERED / NEW / '' — keep polling
|
||||
},
|
||||
error: () => undefined
|
||||
error: () => {
|
||||
this.stopPolling();
|
||||
}
|
||||
});
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user