IS
покажите код, ошибки и т. д.
Size: a a a
IS
_
IS
_
app.post('/tokencheck', async (req, res) => {Запрос:
let query = await User.find({"Token":req.body.token});
if (query[0] != undefined && req.body.token != undefined) {
console.log(query)
console.log(req.body.token)
res.send(true)
} else {
res.send(false)
}
})
sendData(){
let date = new Date(Date.now() + 31622400e3);
date = date.toUTCString();
window.axios({
method: 'post',
url: 'http://192.168.1.75:5000/auth' + '?nocache=' + new Date().getTime(),
data: {
origin: "*",
login: this.login,
pass: this.password,
}
}).then(response => {if (response.data != "Пользователь не найден") {
document.cookie = 'token=' + response.data + '; expires=' + date
window.location='/profile'}});
console.log(cookies.get('token'))
}
ИТ
В
IS
v
N
ЕП
IS
GM
R
IS
_
R
IS