summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-03 05:21:33 +0100
committerRory& <root@rory.gay>2026-02-03 05:24:25 +0100
commit762ea242c0097b9ae9dafdc6db275ee616f4019c (patch)
tree19ae543ace4fcc9d3657341c952b7cfba1f362c1
parentWell, dont then ig (diff)
downloadserver-ts-762ea242c0097b9ae9dafdc6db275ee616f4019c.tar.xz
Actually save webhook apps - fixes #1474
-rw-r--r--src/api/routes/channels/#channel_id/webhooks.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/routes/channels/#channel_id/webhooks.ts b/src/api/routes/channels/#channel_id/webhooks.ts

index 23537b7d..0f686173 100644 --- a/src/api/routes/channels/#channel_id/webhooks.ts +++ b/src/api/routes/channels/#channel_id/webhooks.ts
@@ -17,7 +17,7 @@ */ import { route } from "@spacebar/api"; -import { Channel, Config, DiscordApiErrors, User, Webhook, handleFile, trimSpecial, ValidateName } from "@spacebar/util"; +import { Channel, Config, DiscordApiErrors, User, Webhook, handleFile, trimSpecial, ValidateName, Application } from "@spacebar/util"; import crypto from "crypto"; import { Request, Response, Router } from "express"; import { HTTPError } from "lambert-server"; @@ -98,6 +98,7 @@ router.post( guild_id: channel.guild_id, channel_id: channel.id, user_id: req.user_id, + application: (await Application.findOneBy({ id: req.user_id })) ?? undefined, token: crypto.randomBytes(24).toString("base64url"), }).save();