matcher with only db selection

This commit is contained in:
sbriat
2023-09-06 15:17:51 +02:00
parent e0030aba73
commit 98530af14a
13 changed files with 354 additions and 61 deletions

View File

@@ -100,10 +100,12 @@ export class AdRepository
);
}
getCandidates = async (queryString: string): Promise<AdReadModel[]> =>
this.toAdReadModels(
getCandidates = async (queryString: string): Promise<AdReadModel[]> => {
// console.log(queryString);
return this.toAdReadModels(
(await this.prismaRaw.$queryRawUnsafe(queryString)) as UngroupedAdModel[],
);
};
private toAdReadModels = (
ungroupedAds: UngroupedAdModel[],