mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
separation of discord channels
This commit is contained in:
@@ -38,8 +38,8 @@ export const addTournament = publicProcedure
|
|||||||
if (result.insertedId) {
|
if (result.insertedId) {
|
||||||
const { tournament, country, date, time_control } = tournamentData;
|
const { tournament, country, date, time_control } = tournamentData;
|
||||||
|
|
||||||
if (typeof process.env.DISCORD_WEBHOOK_URL === "string") {
|
if (typeof process.env.DISCORD_WEBHOOK_ADD_TOURNAMENT_URL === "string") {
|
||||||
await fetch(process.env.DISCORD_WEBHOOK_URL as string, {
|
await fetch(process.env.DISCORD_WEBHOOK_ADD_TOURNAMENT_URL as string, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ const getResultDetails = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
const reportFetchError = async (url: string, error: any) => {
|
const reportFetchError = async (url: string, error: any) => {
|
||||||
if (typeof process.env.DISCORD_WEBHOOK_URL === "string") {
|
if (typeof process.env.DISCORD_WEBHOOK_ERROR_LOGS_URL === "string") {
|
||||||
await fetch(process.env.DISCORD_WEBHOOK_URL as string, {
|
await fetch(process.env.DISCORD_WEBHOOK_ERROR_LOGS_URL as string, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
Reference in New Issue
Block a user