From 7b3737d44ceead86fca7c1b6415bf1c4368ae1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=93=8D=BC?= <143974574+xojw@users.noreply.github.com> Date: Sun, 25 May 2025 17:41:29 -0500 Subject: [PATCH] Rename the API --- index.mjs | 2 +- public/assets/js/latest-commit.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.mjs b/index.mjs index c5b753c1..8dce7130 100644 --- a/index.mjs +++ b/index.mjs @@ -166,7 +166,7 @@ if (cluster.isPrimary) { } }); - app.get("/api/github-updates", async (_req, res) => { + app.get("/api/latest-commit", async (_req, res) => { try { const ghRes = await fetch( "https://api.github.com/repos/xojw/waves/commits?per_page=1", diff --git a/public/assets/js/latest-commit.js b/public/assets/js/latest-commit.js index 23f68ff0..f6a06255 100644 --- a/public/assets/js/latest-commit.js +++ b/public/assets/js/latest-commit.js @@ -1,6 +1,6 @@ (async () => { try { - const res = await fetch('/api/github-updates'); + const res = await fetch('/api/latest-commit'); const { updates } = await res.json(); const u = updates[0]; const commitUrl = `https://github.com/xojw/waves/commit/${u.sha}`;