summary refs log tree commit diff
path: root/src/api/util
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-06-17 02:17:59 +0200
committerRory& <root@rory.gay>2026-06-17 02:17:59 +0200
commit4aceae2bed793c68256083468899482539d771bc (patch)
treee14617eed91923959e47a72ff7097cb39db4f2df /src/api/util
parentextensions/String: use custom exception type (diff)
downloadserver-ts-4aceae2bed793c68256083468899482539d771bc.tar.xz
Clean up some imports to make API work again
Diffstat (limited to 'src/api/util')
-rw-r--r--src/api/util/handlers/Message.ts3
-rw-r--r--src/api/util/handlers/Webhook.ts20
2 files changed, 21 insertions, 2 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts

index e2fc798d..9dbad645 100644 --- a/src/api/util/handlers/Message.ts +++ b/src/api/util/handlers/Message.ts
@@ -18,7 +18,8 @@ import { HTTPError } from "lambert-server/HTTPError"; import { Equal, In, Or } from "typeorm"; -import { fillMessageUrlEmbeds } from "@spacebar/api"; +// noinspection ES6PreferShortImport -- Causes a circular reference... +import { fillMessageUrlEmbeds } from "../utility/EmbedHandlers"; import { getDatabase, Application, Attachment, Channel, CloudAttachment, Guild, Member, Message, ReadState, Role, Session, Sticker, User, Webhook } from "@spacebar/database"; import { mathLogBase, arrayDistributeSequentially, Stopwatch, Random } from "@spacebar/extensions"; import { diff --git a/src/api/util/handlers/Webhook.ts b/src/api/util/handlers/Webhook.ts
index 02fe6690..1f4f60a7 100644 --- a/src/api/util/handlers/Webhook.ts +++ b/src/api/util/handlers/Webhook.ts
@@ -1,7 +1,25 @@ +/* + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2026 Spacebar and Spacebar Contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +*/ + import { Request, Response } from "express"; import { HTTPError } from "lambert-server/HTTPError"; import { MoreThan } from "typeorm"; -import { handleMessage, postHandleMessage } from "@spacebar/api"; +import { handleMessage, postHandleMessage } from "./Message"; import { Attachment, Channel, Message, Webhook } from "@spacebar/database"; import { Config, DiscordApiErrors, emitEvent, FieldErrors, MessageCreateEvent, Snowflake, uploadFile, ValidateName } from "@spacebar/util"; import { WebhookExecuteSchema } from "@spacebar/schemas";