import jwt from 'jsonwebtoken';
import config from '../../config.json' with {type: "json"};

const genToken = (login) => {
    const payload = { login };
    return jwt.sign(payload, config.secret, { expiresIn: "7d" });
};

export default genToken;