mirror of
https://github.com/yusufipk/RememberMe.git
synced 2026-09-12 03:06:13 +00:00
created(tests) created tests for person route
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
const jwt = require("jsonwebtoken");
|
||||
module.exports = function () {
|
||||
module.exports.createToken = function () {
|
||||
const token = jwt.sign({ isAdmin: true }, process.env.rememberMe_jwtKey, {
|
||||
expiresIn: "30d",
|
||||
});
|
||||
|
||||
if (!process.env.NODE_ENV === "test") {
|
||||
console.log(token);
|
||||
}
|
||||
|
||||
return token;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user