forked from Yara724/api
Map Fanavaran people and licences by party role; allow unlisted base-info lookups.
Resolve driver, owner, and policyholder from participants when they differ, prefer real licence / driverLicenseDate over dummies, and fall back unknown /lookups/fanavaran/{name} to car/base-info/{name} (including vehicle-groups).
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
} from "src/core/config/fanavaran-client.config";
|
||||
import {
|
||||
FANAVARAN_REMOTE_LOOKUPS,
|
||||
resolveFanavaranRemoteLookup,
|
||||
type FanavaranRemoteLookupDefinition,
|
||||
TEJARAT_STATIC_ACCIDENT_FILES,
|
||||
} from "src/fanavaran/fanavaran-lookup.config";
|
||||
@@ -66,7 +67,7 @@ export class LookupsService {
|
||||
}
|
||||
|
||||
private findRemoteLookup(name: string) {
|
||||
const lookup = FANAVARAN_REMOTE_LOOKUPS.find((item) => item.name === name);
|
||||
const lookup = resolveFanavaranRemoteLookup(name);
|
||||
if (!lookup) {
|
||||
throw new NotFoundException(`Unknown Fanavaran remote lookup: ${name}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user