From 28424ed95030e700f9aa8d6f4305da045f260a39 Mon Sep 17 00:00:00 2001 From: Diego Magdaleno Date: Sun, 23 May 2021 13:43:38 -0500 Subject: Fix: No more type casting required, rather take the gernics --- src/middlewares/Authentication.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/middlewares/Authentication.ts') diff --git a/src/middlewares/Authentication.ts b/src/middlewares/Authentication.ts index 78533489..050c427f 100644 --- a/src/middlewares/Authentication.ts +++ b/src/middlewares/Authentication.ts @@ -29,7 +29,7 @@ export async function Authentication(req: Request, res: Response, next: NextFunc try { - const { jwtSecret } = (Config.apiConfig.getAll() as Config.DefaultOptions).security; + const { jwtSecret } = Config.apiConfig.getAll().security; const decoded: any = await checkToken(req.headers.authorization, jwtSecret); -- cgit 1.5.1