diff --git a/src/services/scheduler_sync/discord_events.py b/src/services/scheduler_sync/discord_events.py index 869f2ca..4697ca3 100644 --- a/src/services/scheduler_sync/discord_events.py +++ b/src/services/scheduler_sync/discord_events.py @@ -124,7 +124,10 @@ async def create_discord_event(event: CreateDiscordEvent): response = await client.post( f"https://discord.com/api/v10/guilds/{config.DISCORD_GUILD_ID}/scheduled-events", json=event.model_dump(), - headers={"Authorization": f"Bot {config.DISCORD_BOT_TOKEN}"} + headers={ + "Authorization": f"Bot {config.DISCORD_BOT_TOKEN}", + "Content-Type": "application/json" + } ) if response.status_code == 400: @@ -150,7 +153,10 @@ async def edit_discord_event(event_id: str, event: UpdateDiscordEvent): response = await client.patch( f"https://discord.com/api/v10/guilds/{config.DISCORD_GUILD_ID}/scheduled-events/{event_id}", json=event.model_dump(), - headers={"Authorization": f"Bot {config.DISCORD_BOT_TOKEN}"} + headers={ + "Authorization": f"Bot {config.DISCORD_BOT_TOKEN}", + "Content-Type": "application/json" + } ) if response.status_code == 400: