Skip to content

Commit

Permalink
Merge pull request #73 from Samagra-Anamaya/feat-search-by-enumerator
Browse files Browse the repository at this point in the history
chore: search limit increase to 30
  • Loading branch information
geeky-abhishek authored Oct 10, 2023
2 parents 54e5590 + c9dafbc commit 669a1a4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/bff/src/submission/submission.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ export class SubmissionService {
data?.submissionData?.aadharNumber,
saltRounds,
);
const lastDigits = data.submissionData.aadharNumber.slice(-4);
data.submissionData.aadharNumber = hashedAadhar;
data.submissionData.lastDigits = lastDigits;
const submission = await this.prisma.submission.create({
data,
});
Expand Down Expand Up @@ -145,9 +147,10 @@ export class SubmissionService {
} else {
submissions = await this.prisma.$queryRawUnsafe(
`SELECT * FROM "public"."Submission"
WHERE
"spdpVillageId" = ${villageId} AND
"submissionData"->>'beneficiaryName' ILIKE '%${text}%' LIMIT 10`,
WHERE
"spdpVillageId" = ${villageId} AND
"submissionData"->>'beneficiaryName' ILIKE '%${text}%'
LIMIT 30`,
);
}

Expand Down

0 comments on commit 669a1a4

Please sign in to comment.