fix mongo script
This commit is contained in:
parent
963af08f12
commit
25daf2e87f
|
@ -1,4 +1,4 @@
|
|||
var u = 'neio';
|
||||
var u = 'neio'.toLowerCase();
|
||||
var since = new Date('2019-01-17');
|
||||
|
||||
function monthDiff(dateFrom, dateTo) {
|
||||
|
@ -6,4 +6,4 @@ function monthDiff(dateFrom, dateTo) {
|
|||
(12 * (dateTo.getFullYear() - dateFrom.getFullYear()))
|
||||
}
|
||||
|
||||
db.user4.update({_id: u}, {$set: { 'plan.months': monthDiff(since, new Date()) + 1, 'plan.since': since}});
|
||||
db.user4.update({_id: u}, {$set: { 'plan.months': NumberInt(monthDiff(since, new Date()) + 1), 'plan.since': since}});
|
||||
|
|
Loading…
Reference in a new issue