From 0e7ae13ceb0f11926152dc102277560d1c246205 Mon Sep 17 00:00:00 2001 From: Alexander Lee Date: Mon, 21 Feb 2022 11:59:09 +0800 Subject: [PATCH 1/2] Fix: use pushed_at instead of updated_at --- routes/sites.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/sites.js b/routes/sites.js index 20e61eadb..69accb160 100644 --- a/routes/sites.js +++ b/routes/sites.js @@ -76,7 +76,7 @@ async function getSites(req, res) { return resp.data .map((repoData) => { const { - updated_at: updatedAt, + pushed_at: updatedAt, permissions, name, private: isPrivate, From 9e2ac84e32f6b394acd6cb6b4c0ad8bd604d6b87 Mon Sep 17 00:00:00 2001 From: Alexander Lee Date: Mon, 21 Feb 2022 12:01:00 +0800 Subject: [PATCH 2/2] Fix: getLastUpdated endpoint --- routes/sites.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/sites.js b/routes/sites.js index 69accb160..a9fbd48a6 100644 --- a/routes/sites.js +++ b/routes/sites.js @@ -136,7 +136,7 @@ async function getLastUpdated(req, res) { "Content-Type": "application/json", }, }) - const { updated_at: updatedAt } = resp.data + const { pushed_at: updatedAt } = resp.data return res.status(200).json({ lastUpdated: timeDiff(updatedAt) }) }