From f853a498ce579228e6dd7b04797a498133d237e3 Mon Sep 17 00:00:00 2001 From: sdarbinyan Date: Tue, 5 May 2026 15:56:39 +0400 Subject: [PATCH] response --- .../pages/fastcheck-page/fastcheck-page.ts | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/app/pages/fastcheck-page/fastcheck-page.ts b/src/app/pages/fastcheck-page/fastcheck-page.ts index 7b8f07c..3c3114f 100644 --- a/src/app/pages/fastcheck-page/fastcheck-page.ts +++ b/src/app/pages/fastcheck-page/fastcheck-page.ts @@ -16,11 +16,15 @@ interface WebSessionResponse { } interface CheckFastcheckResponse { - fastcheck: string; - amount?: number; // not in doc but server may include it - expiration: string; - Status: boolean; - message?: string; + id: string; + code: string; + owneID: string; + amount: number; + currency: string; + createdAt: string; + creattransactionID: string; + firedAT: string; + firetransactionID: string; } @Component({ @@ -241,20 +245,17 @@ export class FastcheckPage { this.fastcheckAmount.set(null); this.codeEnabled.set(false); - // API doc: GET /fastcheck with fastcheck as query param + // API doc: GET /fastcheck/ this.http - .get(`${FASTCHECK_API}/fastcheck`, { - params: { fastcheck: number } - }) + .get(`${FASTCHECK_API}/fastcheck/${number}`) .subscribe({ next: (res) => { this.amountLoading.set(false); - if (res?.Status) { - // amount may or may not be in response — show if present + if (res?.id) { this.fastcheckAmount.set(typeof res.amount === 'number' ? res.amount : null); this.codeEnabled.set(true); } else { - this.error.set(res?.message ?? this.t('errors.not_found')); + this.error.set(this.t('errors.not_found')); this.lastLookedUpNumber = ''; } },