forked from Yara724/api
fix: recover saved photo uploads and lower car-body description minimum
Read saved document status from maps and plain objects, acknowledge verified document retries without replacing stored images, and preserve upload authorization and resend behavior. Lower the car-body narrative minimum to 30 characters with Persian errors and boundary regression coverage.
This commit is contained in:
@@ -220,9 +220,9 @@ export class RequestManagementService {
|
||||
): void {
|
||||
if (requestType !== BlameRequestType.CAR_BODY) return;
|
||||
const length = String(description ?? "").trim().length;
|
||||
if (length < 100) {
|
||||
if (length < 30) {
|
||||
throw new BadRequestException(
|
||||
"CAR_BODY description must contain at least 100 non-whitespace characters.",
|
||||
"شرح حادثه باید حداقل ۳۰ کاراکتر باشد.",
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -8627,6 +8627,8 @@ export class RequestManagementService {
|
||||
const idx = this.getPartyIndex(req, role);
|
||||
if (idx === -1) throw new BadRequestException(`${role} party not found`);
|
||||
|
||||
this.assertCarBodyDescriptionMinimum(req.type, body.desc);
|
||||
|
||||
const party = req.parties[idx];
|
||||
if (!party.statement) party.statement = {} as any;
|
||||
party.statement.description = body.desc;
|
||||
|
||||
Reference in New Issue
Block a user