Fix Tahesab empty-range 502 by using a single ByCode call.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-05 10:41:12 +03:30
co-authored by Cursor
parent 38f4b75a78
commit 43526cb980
3 changed files with 35 additions and 19 deletions
@@ -145,6 +145,7 @@ export class TahesabApi {
bodyKey?: string,
args?: unknown[],
method?: 'GET' | 'POST',
timeoutMs?: number,
) {
return this.http.call<T>({
...this.creds,
@@ -152,6 +153,7 @@ export class TahesabApi {
bodyKey,
args,
method,
timeoutMs,
});
}
@@ -182,12 +184,18 @@ export class TahesabApi {
return this.call('DoEditMoshtari', 'DoEditMoshtari', args);
}
doListMoshtariByCode(fromCode: number, toCode: number) {
doListMoshtariByCode(
fromCode: number,
toCode: number,
opts?: { timeoutMs?: number },
) {
// OpenAPI/Postman: کلید body برای ByCode دقیقاً «Dolistmoshtari» است (حساس به حروف)
return this.call(
'DoListMoshtari-ByCode',
'Dolistmoshtari',
[fromCode, toCode],
'POST',
opts?.timeoutMs,
);
}