forked from Yara724/api
Fixed Car_Body inquiry for Parsian
This commit is contained in:
@@ -80,6 +80,15 @@ export class SandHubService {
|
||||
return String(process.env.CLIENT_ID ?? "") === "8";
|
||||
}
|
||||
|
||||
/**
|
||||
* The processed Fanavaran CAR_BODY lookup belongs only to the Parsian
|
||||
* Fanavaran profile. Do not use the deployment-wide ESG selector here:
|
||||
* `FANAVARAN_CLIENT=parsian` is valid even when CLIENT_ID is not 8.
|
||||
*/
|
||||
private shouldUseParsianCarBodyLookup(): boolean {
|
||||
return resolveFanavaranClientKey() === "parsian";
|
||||
}
|
||||
|
||||
/** Fixed plate/insurance inquiry payload used everywhere we mock block-inquiry style APIs. */
|
||||
private buildMockPlateInquiryRaw(
|
||||
ctx: MockInquiryCompanyContext,
|
||||
@@ -857,7 +866,7 @@ export class SandHubService {
|
||||
raw: any;
|
||||
mapped: Record<string, unknown>;
|
||||
}> {
|
||||
if (!this.shouldUseEsgInquiryProvider()) {
|
||||
if (!this.shouldUseParsianCarBodyLookup()) {
|
||||
const result = await this.getTejaratCarBodyInquiry(
|
||||
userDetail as SandHubDetailDto,
|
||||
options,
|
||||
|
||||
Reference in New Issue
Block a user