Fix Tahesab empty-range 502 by using a single ByCode call.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user