Klimafaktoren gefixt

This commit is contained in:
Moritz Utcke
2025-03-19 12:59:46 -03:00
parent 6c0ab35f91
commit cb7b1f0c41
4 changed files with 14 additions and 5 deletions

View File

@@ -11,11 +11,15 @@ export const getKlimafaktoren = memoize(async (date: Date, plz: string) => {
const response = await api.klimafaktoren.GET.fetch({
plz,
genauigkeit: "years",
startdatum: moment(date).utc(true).toDate(),
enddatum: moment(date).add(2, "years").utc(true).toDate(),
// @ts-ignore Der Adapter nimmt z.coerce.date()
startdatum: moment(date).utc(true).toString(),
// @ts-ignore Der Adapter nimmt z.coerce.date()
enddatum: moment(date).add(2, "years").utc(true).toString(),
});
return response;
} catch (e) {
console.log(e);
return null;
}
});