Add timetable count to stats

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-05-31 19:14:42 +01:00
parent e76731f18a
commit cb8d53ae36
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
const version = { const version = {
api: ['/api/v1/',], api: ['/api/v1/',],
app: '2023.5.3' app: '2023.5.4'
}; };
module.exports = version; module.exports = version;

View File

@ -15,6 +15,7 @@ async function buildJson() {
const pisCount = db.colCount('pis'); const pisCount = db.colCount('pis');
const corpusCount = db.colCount('corpus'); const corpusCount = db.colCount('corpus');
const stationsCount = db.colCount('stations'); const stationsCount = db.colCount('stations');
const timetableCount = db.colCount('timetable');
// Insert data // Insert data
json.mode = process.env.NODE_ENV; json.mode = process.env.NODE_ENV;
@ -29,6 +30,7 @@ async function buildJson() {
json.count.pis = await pisCount; json.count.pis = await pisCount;
json.count.corpus = await corpusCount; json.count.corpus = await corpusCount;
json.count.stations = await stationsCount; json.count.stations = await stationsCount;
json.count.timetable = await timetableCount;
return json; return json;
} }