Fix homework date

This commit is contained in:
Rafał Borcz 2021-05-02 14:49:23 +02:00
parent a1c0f74206
commit 0007b46a5f

View file

@ -814,7 +814,7 @@ router.all("/Homework.mvc/Get", (req, res) => {
const subjects = require("../../data/api/dictionaries/Przedmioty");
const teachers = require("../../data/api/dictionaries/Nauczyciele");
const homework = require("../../data/api/student/ZadaniaDomowe");
const requestDate = req.body.data ? parseISO(req.body.data.replace("T", " ").replace(/Z$/, '')) : parseISO(homework[0].DataTekst);
const requestDate = req.body.date ? parseISO(req.body.date.replace("T", " ").replace(/Z$/, '')) : parseISO(homework[0].DataTekst);
// const baseOffset = differenceInDays(requestDate, parseISO(homework[0].DataTekst));
res.json({