diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-09-17 19:38:54 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-09-17 19:38:54 +0200 |
commit | 15b79052c88ce30a713c6f942cedf01211b50a5f (patch) | |
tree | cc444dce096a314e7fa2700a07858039d7ee8a61 /src/api/middlewares/Authentication.ts | |
parent | Add register ratelimit (diff) | |
download | server-15b79052c88ce30a713c6f942cedf01211b50a5f.tar.xz |
Partially refactor code to use localization
Diffstat (limited to 'src/api/middlewares/Authentication.ts')
-rw-r--r-- | src/api/middlewares/Authentication.ts | 2 |
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; |