fanavaran V15 tejaratno

This commit is contained in:
2026-10-10 16:04:07 +03:30
parent 22ffeed75c
commit 64d5aa691f
12 changed files with 279 additions and 33 deletions
+7 -4
View File
@@ -1,4 +1,4 @@
import { tejaratNotifierLookup } from "src/fanavaran/tejarat-notifier";
import { isTejaratNotifierLookup } from "src/fanavaran/tejarat-notifier";
import {
BadRequestException,
Injectable,
@@ -126,12 +126,15 @@ export class LookupsService implements OnModuleInit, OnModuleDestroy {
async getClientRemoteLookup(lookupName: string): Promise<unknown> {
const clientKey = this.activeClientKey();
const notifier = tejaratNotifierLookup(lookupName);
if (notifier) {
if (isTejaratNotifierLookup(lookupName)) {
if (clientKey !== "tejaratno") {
throw new BadRequestException("Notifier lookups apply only to TejaratNo.");
}
return notifier;
const stored = await this.fanavaranLookupService.readStoredLookup(lookupName);
if (stored == null) {
throw new NotFoundException(`Lookup "${lookupName}" not found`);
}
return stored;
}
const definition = this.findRemoteLookup(lookupName);