Use secretKey module directly

This commit is contained in:
Michael Jackson
2018-07-27 05:39:57 -07:00
parent ab72779cfb
commit 168ccf5aac
2 changed files with 3 additions and 8 deletions

View File

@ -90,14 +90,9 @@ function removeAllRevokedTokens() {
}); });
} }
function getPublicKey() {
return secretKey.public;
}
module.exports = { module.exports = {
createToken, createToken,
verifyToken, verifyToken,
revokeToken, revokeToken,
removeAllRevokedTokens, removeAllRevokedTokens
getPublicKey
}; };

View File

@ -1,7 +1,7 @@
const AuthAPI = require("../AuthAPI"); const secretKey = require("../secretKey");
function showPublicKey(req, res) { function showPublicKey(req, res) {
res.send({ publicKey: AuthAPI.getPublicKey() }); res.send({ publicKey: secretKey.public });
} }
module.exports = showPublicKey; module.exports = showPublicKey;