diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-01-12 13:46:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 23:46:36 +1100 |
commit | 6122374e4d97b2db040e8a98e4187dd0a0bccf9e (patch) | |
tree | 6748fddf0ebd5477d797003122a8ae9adb156004 /src/api/middlewares | |
parent | Temp fix for DMs (diff) | |
download | server-6122374e4d97b2db040e8a98e4187dd0a0bccf9e.tar.xz |
Dev/post refactor fixes (#927)
* Re-introduce outgoing message logging Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Websocket dumping * Sentry user count on API * Generate session ID upon opening websocket, fix gateway dumps * Async file io in src/gateway/events/Message.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Async file io in src/util/util/Config.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Make pre-commit hook executable Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Fixed sync file io in src/util/util/Config.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Fixed missing await call in src/util/util/AutoUpdate.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Add comment to src/gateway/events/Connection.ts Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> * Clean up gateway dumping code Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com> Co-authored-by: Madeline <46743919+MaddyUnderStars@users.noreply.github.com>
Diffstat (limited to 'src/api/middlewares')
-rw-r--r-- | src/api/middlewares/Authentication.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/middlewares/Authentication.ts b/src/api/middlewares/Authentication.ts index ec2c42e5..2aa42e8b 100644 --- a/src/api/middlewares/Authentication.ts +++ b/src/api/middlewares/Authentication.ts @@ -1,6 +1,7 @@ import { NextFunction, Request, Response } from "express"; import { HTTPError } from "lambert-server"; import { checkToken, Config, Rights } from "@fosscord/util"; +import * as Sentry from "@sentry/node"; export const NO_AUTHORIZATION_ROUTES = [ // Authentication routes @@ -63,6 +64,8 @@ export async function Authentication( if (!req.headers.authorization) return next(new HTTPError("Missing Authorization Header", 401)); + Sentry.setUser({ id: req.user_id }); + try { const { jwtSecret } = Config.get().security; |