From e913db5d5799cc9e6d03eb873bfb2a303e5edd8f Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 23 Jun 2024 09:53:13 +0100 Subject: [PATCH] Fix statistics to work with timetable-mgr metadata Signed-off-by: Fred Boniface --- src/services/stats.services.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/stats.services.js b/src/services/stats.services.js index 9db9a30..f3123b1 100644 --- a/src/services/stats.services.js +++ b/src/services/stats.services.js @@ -56,7 +56,7 @@ async function statistics() { logger.debug("statsServices.statistics: Fetching statistics"); const countersPromise = db.query("meta", { target: "counters" }); - const timetablePromise = db.query("meta", { target: "timetable" }); + const timetablePromise = db.query("meta", { type: "CifMetadata" }); const pisPromise = db.query("meta", { target: "pis" }); const corpusPromise = db.query("meta", { target: "corpus" }); const reasonCodesPromise = db.query("meta", { target: "reasonCodes" }); @@ -102,7 +102,7 @@ async function statistics() { runtimeMode: process.env.NODE_ENV || "Unknown", reset: counters[0]["since"], updateTimes: { - timetable: timetable[0]["updated"], + timetable: (timetable[0]["lastUpdate"]), pis: pis[0]["updated"], corpus: corpus[0]["updated"], reasonCodes: reasonCodes[0]["updated"],