Rename the API
This commit is contained in:
parent
91e44ce19a
commit
7b3737d44c
|
@ -166,7 +166,7 @@ if (cluster.isPrimary) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get("/api/github-updates", async (_req, res) => {
|
app.get("/api/latest-commit", async (_req, res) => {
|
||||||
try {
|
try {
|
||||||
const ghRes = await fetch(
|
const ghRes = await fetch(
|
||||||
"https://api.github.com/repos/xojw/waves/commits?per_page=1",
|
"https://api.github.com/repos/xojw/waves/commits?per_page=1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
const res = await fetch('/api/github-updates');
|
const res = await fetch('/api/latest-commit');
|
||||||
const { updates } = await res.json();
|
const { updates } = await res.json();
|
||||||
const u = updates[0];
|
const u = updates[0];
|
||||||
const commitUrl = `https://github.com/xojw/waves/commit/${u.sha}`;
|
const commitUrl = `https://github.com/xojw/waves/commit/${u.sha}`;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user