Skip to content

Commit

Permalink
eliminate API_BASE
Browse files Browse the repository at this point in the history
  • Loading branch information
haliphax committed Mar 14, 2024
1 parent 01a45d8 commit bb92729
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/discord.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Cookies from "js-cookie";

const API_BASE = "https://discord.com/api/v10";

export interface Thing {
id: number;
}
Expand Down Expand Up @@ -48,7 +46,7 @@ export const getDiscordToken = () => {
};

const discordApi = async (token: string, url: string) =>
await fetch(`${API_BASE}${url}`, {
await fetch(`https://discord.com/api/v10${url}`, {
headers: { Authorization: `Bearer ${token}` },
});

Expand Down

0 comments on commit bb92729

Please sign in to comment.