Add DziennikDataOd and DziennikDataDo fields to UczenDziennik endpoint
This commit is contained in:
parent
f40c03b3d2
commit
2a67b6de1f
1 changed files with 23 additions and 10 deletions
|
@ -6,7 +6,18 @@ const converter = require('../utils/converter');
|
||||||
const Tokens = require('csrf');
|
const Tokens = require('csrf');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const {getGradeColorByCategoryName} = require("../utils/gradeColor");
|
const {getGradeColorByCategoryName} = require("../utils/gradeColor");
|
||||||
const { format, fromUnixTime, getYear, addYears, addMonths, addDays, subDays, differenceInDays, parseISO, startOfWeek } = require('date-fns');
|
const {
|
||||||
|
format,
|
||||||
|
fromUnixTime,
|
||||||
|
getYear,
|
||||||
|
addYears,
|
||||||
|
addMonths,
|
||||||
|
addDays,
|
||||||
|
subDays,
|
||||||
|
differenceInDays,
|
||||||
|
parseISO,
|
||||||
|
startOfWeek
|
||||||
|
} = require('date-fns');
|
||||||
|
|
||||||
router.get("/", (req, res) => {
|
router.get("/", (req, res) => {
|
||||||
const base = protocol(req) + "://" + req.get('host') + "/powiatwulkanowy/123456";
|
const base = protocol(req) + "://" + req.get('host') + "/powiatwulkanowy/123456";
|
||||||
|
@ -132,6 +143,8 @@ router.all("/UczenDziennik.mvc/Get", (req, res) => {
|
||||||
Id: semesterId
|
Id: semesterId
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
|
DziennikDataOd: format(addMonths(item.OkresDataOd, 0), 'yyyy-MM-dd HH:mm:ss'),
|
||||||
|
DziennikDataDo: format(addMonths(item.OkresDataDo, 7), 'yyyy-MM-dd HH:mm:ss'),
|
||||||
"IdSioTyp": 11,
|
"IdSioTyp": 11,
|
||||||
"IsDorosli": false,
|
"IsDorosli": false,
|
||||||
"IsPolicealna": false,
|
"IsPolicealna": false,
|
||||||
|
|
Loading…
Reference in a new issue