Skip to content

Commit

Permalink
update EOD updates API
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Apr 30, 2024
1 parent 2bc4806 commit 3933218
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions activities-bot/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,17 @@ const leaderboardApiHeaders = {
Authorization: `${LEADERBOARD_API_KEY}`,
};

const eodUpdatesApi = `${LEADERBOARD_URL}/api/slack-eod-bot/eod-updates`;

export async function getEODUpdates() {
const res = await fetch(LEADERBOARD_URL, {
const res = await fetch(eodUpdatesApi, {
headers: leaderboardApiHeaders,
});
return res.json();
}

export async function flushEODUpdates() {
const res = await fetch(LEADERBOARD_URL, {
const res = await fetch(eodUpdatesApi, {
headers: leaderboardApiHeaders,
method: "DELETE",
});
Expand Down

0 comments on commit 3933218

Please sign in to comment.