Skip to content

Commit

Permalink
🩹 Change recent messages api url
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryScaletta committed Mar 14, 2024
1 parent 1ebfb98 commit 44f8f8b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/features/api/recentMessages/recentMessagesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ export type RecentMessagesResponse = {
error: null;
};

const ALTERNATIVE_HISTORY_BASE_URL =
process.env.NEXT_PUBLIC_ALTERNATIVE_HISTORY_BASE_URL;
const ALTERNATIVE_HISTORY_CHANNELS = (
process.env.NEXT_PUBLIC_ALTERNATIVE_HISTORY_CHANNELS || ''
).split(';');

const recentMessages = {
get: (channelName: string): Promise<RecentMessagesResponse> => {
const url = ALTERNATIVE_HISTORY_CHANNELS.includes(channelName)
? `${ALTERNATIVE_HISTORY_BASE_URL}/api/v1/recent-messages/${channelName}`
? `https://diverse-marillin-honeykingdom.koyeb.app/api/twitch/recent-messages/${channelName}`
: `https://recent-messages.robotty.de/api/v2/recent-messages/${channelName}?clearchatToNotice=true`;
return fetch(url).then((r) => r.json());
},
Expand Down

0 comments on commit 44f8f8b

Please sign in to comment.