summary refs log tree commit diff
path: root/src/api/middlewares/Authentication.ts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-09-17 19:38:54 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2022-09-17 19:38:54 +0200
commit15b79052c88ce30a713c6f942cedf01211b50a5f (patch)
treecc444dce096a314e7fa2700a07858039d7ee8a61 /src/api/middlewares/Authentication.ts
parentAdd register ratelimit (diff)
downloadserver-15b79052c88ce30a713c6f942cedf01211b50a5f.tar.xz
Partially refactor code to use localization
Diffstat (limited to 'src/api/middlewares/Authentication.ts')
-rw-r--r--src/api/middlewares/Authentication.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/middlewares/Authentication.ts b/src/api/middlewares/Authentication.ts
index 6d063953..fbf71cd5 100644
--- a/src/api/middlewares/Authentication.ts
+++ b/src/api/middlewares/Authentication.ts
@@ -53,7 +53,7 @@ export async function Authentication(req: Request, res: Response, next: NextFunc
 		})
 	)
 		return next();
-	if (!req.headers.authorization) return next(new HTTPError("Missing Authorization Header", 401));
+	if (!req.headers.authorization) return next(new HTTPError(req.t("auth:generic.MISSING_AUTH_HEADER"), 401));
 
 	try {
 		const { jwtSecret } = Config.get().security;