diff options
Diffstat (limited to 'src/util/checkToken.ts')
-rw-r--r-- | src/util/checkToken.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/checkToken.ts b/src/util/checkToken.ts index 96c7806a..b4635126 100644 --- a/src/util/checkToken.ts +++ b/src/util/checkToken.ts @@ -2,7 +2,7 @@ import { JWTOptions } from "./Constants"; import jwt from "jsonwebtoken"; import Config from "./Config"; -export function checkToken(token: string) { +export function checkToken(token: string): Promise<any> { return new Promise((res, rej) => { jwt.verify(token, Config.getAll().api.security.jwtSecret, JWTOptions, (err, decoded: any) => { if (err || !decoded) return rej("Invalid Token"); |