separation of discord channels

This commit is contained in:
Owen Rees
2023-09-19 16:14:14 +02:00
parent a82616bd34
commit 1509881d9b
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ export const addTournament = publicProcedure
if (result.insertedId) {
const { tournament, country, date, time_control } = tournamentData;
if (typeof process.env.DISCORD_WEBHOOK_URL === "string") {
await fetch(process.env.DISCORD_WEBHOOK_URL as string, {
if (typeof process.env.DISCORD_WEBHOOK_ADD_TOURNAMENT_URL === "string") {
await fetch(process.env.DISCORD_WEBHOOK_ADD_TOURNAMENT_URL as string, {
method: "POST",
headers: {
"Content-Type": "application/json",
@@ -77,8 +77,8 @@ const getResultDetails = (
};
const reportFetchError = async (url: string, error: any) => {
if (typeof process.env.DISCORD_WEBHOOK_URL === "string") {
await fetch(process.env.DISCORD_WEBHOOK_URL as string, {
if (typeof process.env.DISCORD_WEBHOOK_ERROR_LOGS_URL === "string") {
await fetch(process.env.DISCORD_WEBHOOK_ERROR_LOGS_URL as string, {
method: "POST",
headers: {
"Content-Type": "application/json",