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