This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
2020-09-10 10:15:54 +00:00
|
|
|
const db = require("../db");
|
2020-09-10 12:03:56 +00:00
|
|
|
const { getYesterdayISOString } = require("../utils");
|
2020-09-10 10:15:54 +00:00
|
|
|
|
|
|
|
// returns all verbose health check entries
|
|
|
|
module.exports = (req, res) => {
|
2020-09-10 12:03:56 +00:00
|
|
|
const yesterday = getYesterdayISOString();
|
|
|
|
const entries = db
|
|
|
|
.get("verbose")
|
|
|
|
.orderBy("date", "desc")
|
|
|
|
.filter(({ date }) => date > yesterday)
|
|
|
|
.value();
|
2020-09-10 10:15:54 +00:00
|
|
|
|
|
|
|
res.send(entries);
|
|
|
|
};
|