forked from Yara724/api
merge upstream
This commit is contained in:
@@ -221,9 +221,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.",
|
||||
"شرح حادثه باید حداقل ۳۰ کاراکتر باشد.",
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -8724,6 +8724,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 (req.type === BlameRequestType.CAR_BODY && role === PartyRole.FIRST) {
|
||||
await this.validateCarBodyAccidentCoverage(party, body.accidentDate);
|
||||
|
||||
Reference in New Issue
Block a user