Skip to content

Commit

Permalink
fix: batyhing water alert (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudambro authored Mar 12, 2024
1 parent 472dbf3 commit 1c5b5b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api-node/src/aggregators/bathing_water.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export async function getBathingWaterIndicator() {
}
const diffusionDate = scrapingResult.result_date
? scrapingResult.result_date
: dayjs().format('YYYY-MM-DD');
: dayjs().utc().startOf('year');
const existingResults = await prisma.bathingWater.count({
where: {
diffusion_date: dayjs(diffusionDate).utc().toDate(),
Expand Down Expand Up @@ -164,6 +164,7 @@ export async function getBathingWaterIndicator() {
id_carte: idCarte,
isite: site.isite,
name: site.nom,
result_date: scrapingResult.result_date,
result_value: scrapingResult.result_value,
swimming_season_start: scrapingResult.swimming_season_start,
swimming_season_end: scrapingResult.swimming_season_end,
Expand Down

0 comments on commit 1c5b5b5

Please sign in to comment.