feat: add searchByAddress route

This commit is contained in:
2025-10-13 12:00:40 +05:30
parent 183cf2dde9
commit 369adfaaa6
4 changed files with 45 additions and 1 deletions

View File

@@ -439,3 +439,9 @@ export async function searchPermit(
},
};
}
export async function searchPermitByAddress(address: string) {
return await permitModel
.find({ $text: { $search: address } }, { score: { $meta: "textScore" } })
.sort({ score: { $meta: "textScore" } });
}