Enforce claim beneficiary access and retire unused legacy APIs

This commit is contained in:
SepehrYahyaee
2026-10-05 14:39:51 +03:30
parent 0735333467
commit a3f9aab8fb
104 changed files with 6864 additions and 13223 deletions
+3 -13
View File
@@ -1,15 +1,15 @@
import { Injectable, Logger } from "@nestjs/common";
import { InjectModel } from "@nestjs/mongoose";
import { isAxiosError, type AxiosResponse } from "axios";
import { randomBytes } from "node:crypto";
import { Model, Types } from "mongoose";
import { randomBytes } from "node:crypto";
import type { FanavaranAuditSession } from "./fanavaran-audit.types";
import {
FanavaranAuditLog,
FanavaranAuditLogDocument,
FanavaranAuditStatus,
FanavaranAuditStep,
} from "./schema/fanavaran-audit-log.schema";
import type { FanavaranAuditSession } from "./fanavaran-audit.types";
export interface RecordFanavaranAuditStepInput {
session: FanavaranAuditSession;
@@ -104,9 +104,7 @@ export class FanavaranAuditService {
const lower = key.toLowerCase();
if (FanavaranAuditService.SENSITIVE_HEADER_KEYS.has(lower)) {
out[key] =
typeof rawValue === "string"
? this.maskToken(rawValue)
: "***";
typeof rawValue === "string" ? this.maskToken(rawValue) : "***";
continue;
}
if (
@@ -301,14 +299,6 @@ export class FanavaranAuditService {
}
}
async findByTrackingCode(trackingCode: string) {
return this.auditModel
.find({ trackingCode })
.sort({ createdAt: 1 })
.lean()
.exec();
}
private maskSensitiveDeep(value: unknown, depth = 0): unknown {
if (depth > 8) {
return "[max-depth]";