summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-14 04:03:56 +0100
committerRory& <root@rory.gay>2026-03-14 04:03:56 +0100
commit6e8292508e407f4bbc815caef30651af5c9bc570 (patch)
tree9868b5fc0c95f0be3ae07aa4e6c51f014d1f0a6f
parentproperly mark unused params (diff)
downloadserver-ts-6e8292508e407f4bbc815caef30651af5c9bc570.tar.xz
minor cleanup
-rw-r--r--src/api/middlewares/ErrorHandler.ts2
-rw-r--r--src/api/routes/guilds/#guild_id/messages/search.ts2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/api/middlewares/ErrorHandler.ts b/src/api/middlewares/ErrorHandler.ts

index 87e44c63..02d38def 100644 --- a/src/api/middlewares/ErrorHandler.ts +++ b/src/api/middlewares/ErrorHandler.ts
@@ -50,7 +50,7 @@ export function ErrorHandler(error: Error & { type?: string }, req: Request, res code = 50109; message = "The request body contains invalid JSON."; } else { - console.error(`[Error] ${code} ${req.url}\n`, errors || error, "\nbody:", req.body); + console.error(`[Error] ${code} ${req.url}\n`, errors, "\nbody:", req.body); if (req.server?.options?.production) { // don't expose internal errors to the user, instead human errors should be thrown as HTTPError diff --git a/src/api/routes/guilds/#guild_id/messages/search.ts b/src/api/routes/guilds/#guild_id/messages/search.ts
index 601d39d6..462ca834 100644 --- a/src/api/routes/guilds/#guild_id/messages/search.ts +++ b/src/api/routes/guilds/#guild_id/messages/search.ts
@@ -16,8 +16,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -/* eslint-disable @typescript-eslint/ban-ts-comment */ - import { route } from "@spacebar/api"; import { Channel, FieldErrors, Member, Message, Snowflake, getPermission } from "@spacebar/util"; import { Request, Response, Router } from "express";