1
0
forked from Yara724/api

Fixed inquiry of birthdate

This commit is contained in:
SepehrYahyaee
2026-06-01 14:11:23 +03:30
parent 6261af8a29
commit 5fab0a00b6
2 changed files with 21 additions and 22 deletions

View File

@@ -564,6 +564,7 @@ export class SandHubService {
const requestUrl = `${process.env.SANHUB_BASE_URL}/personal-inquiry/tejarat-no`;
const gregorianBirthdate = jalaliToGregorianDate(birthDate);
console.log(gregorianBirthdate);
if (!gregorianBirthdate) {
throw new BadRequestException(
`Invalid birth date for personal inquiry: ${birthDate}. Expected a Jalali date (e.g. 13770624 or "1377-06-24").`,