fanavaran lookups done

This commit is contained in:
2026-08-03 15:53:36 +03:30
parent 767317cce8
commit 738344a9d4
3 changed files with 102 additions and 7 deletions

View File

@@ -61,12 +61,14 @@ export class LookupsService {
const clientKey = this.activeClientKey();
const definition = this.findRemoteLookup(lookupName);
// Parsian: file → lookups collection → Fanavaran (default inside FanavaranLookupService)
// Tejaratno: file → Fanavaran → DB on API failure
return this.fanavaranLookupService.getRemoteLookup(
clientKey,
definition.url,
definition.cacheFile,
clientKey === "tejaratno"
? async () => this.getLookup(lookupName)
? { dbSource: () => this.getLookup(lookupName) }
: undefined,
);
}