diff options
author | afeuerstein <32029275+afeuerstein@users.noreply.github.com> | 2021-04-06 21:32:44 +0200 |
---|---|---|
committer | afeuerstein <32029275+afeuerstein@users.noreply.github.com> | 2021-04-06 21:32:44 +0200 |
commit | 0e8356e9b1acd95be5b94f0e55bba9d749a36d12 (patch) | |
tree | 628a02e478cf8df2b4c12eab14bfb7f1dac03be2 /dist/util/checkToken.js | |
parent | :bug: fix Message Model (diff) | |
download | server-0e8356e9b1acd95be5b94f0e55bba9d749a36d12.tar.xz |
remove compiled typescript code from repo
Diffstat (limited to 'dist/util/checkToken.js')
-rw-r--r-- | dist/util/checkToken.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/dist/util/checkToken.js b/dist/util/checkToken.js deleted file mode 100644 index 17d88178..00000000 --- a/dist/util/checkToken.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkToken = void 0; -const Constants_1 = require("./Constants"); -const jsonwebtoken_1 = __importDefault(require("jsonwebtoken")); -const Config_1 = __importDefault(require("./Config")); -function checkToken(token) { - return new Promise((res, rej) => { - jsonwebtoken_1.default.verify(token, Config_1.default.getAll().api.security.jwtSecret, Constants_1.JWTOptions, (err, decoded) => { - if (err || !decoded) - return rej("Invalid Token"); - return res(decoded); - }); - }); -} -exports.checkToken = checkToken; -//# sourceMappingURL=checkToken.js.map \ No newline at end of file |