//creation of token
res.cookie('jwt', token, { httpOnly: true, maxAge : 60 * 60 * 24});
// the logout and where i want to destroy it
exports.logout = (req, res) => {
res.cookie('jwt', "token", {httpOnly:true,maxAge:1000})
// res.clearCookie('jwt');
}
it can't be destroyed after the logout function