Skip to content
Snippets Groups Projects
Commit d7295b62 authored by Nicolas Fley's avatar Nicolas Fley
Browse files

lol

parent 8f24d636
Branches
No related tags found
No related merge requests found
......@@ -66,7 +66,6 @@ function getItemsByDescription(description, page, step, typeItem) {
typeItem : typeItem
}
}
console.log(where)
return Items.findAll({
offset: offset,
limit: offset + step,
......
......@@ -35,19 +35,19 @@ var Users = sequelize.define('Users', {
sequelize.sync()
function refreshUser(user){
expiresTime = user.toJSON().expires
if( moment.duration(moment(expiresTime).diff(moment())).asHours() < 23){
//expiresTime = user.toJSON().expires
//if( moment.duration(moment(expiresTime).diff(moment())).asHours() < 23){
user.updateAttributes({
expires : moment().add(1,'days')
})
}
//}
}
function refreshById(id,timeLeft){
if( moment.duration(moment(user.expires).diff(moment())).asHours() < 23){
//if( moment.duration(moment(user.expires).diff(moment())).asHours() < 23){
return true;
}else{
/*}else{
return false;
}
}*/
}
function getUser(id) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment