forked from Yara724/api
Add TejaratNo notifier review and submission validation
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { tejaratNotifierLookup } from "src/fanavaran/tejarat-notifier";
|
||||
import {
|
||||
BadRequestException,
|
||||
Injectable,
|
||||
@@ -125,6 +126,13 @@ export class LookupsService implements OnModuleInit, OnModuleDestroy {
|
||||
|
||||
async getClientRemoteLookup(lookupName: string): Promise<unknown> {
|
||||
const clientKey = this.activeClientKey();
|
||||
const notifier = tejaratNotifierLookup(lookupName);
|
||||
if (notifier) {
|
||||
if (clientKey !== "tejaratno") {
|
||||
throw new BadRequestException("Notifier lookups apply only to TejaratNo.");
|
||||
}
|
||||
return notifier;
|
||||
}
|
||||
const definition = this.findRemoteLookup(lookupName);
|
||||
|
||||
// Parsian: file → lookups collection → Fanavaran (default inside FanavaranLookupService)
|
||||
|
||||
Reference in New Issue
Block a user