summaryrefslogtreecommitdiff
path: root/mock
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-03-20 01:03:23 +0100
committerJules Laplace <jules@okfoc.us>2017-03-20 01:03:23 +0100
commitbf7ac6af587f68553b83a54fcb724dfc9d684644 (patch)
treec08ae482e8a7a5804018aab2610771fed64c5855 /mock
parent29c18b202b291304ee8b08c2387b25542f76c414 (diff)
refactor frontend
Diffstat (limited to 'mock')
-rw-r--r--mock/index.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/mock/index.js b/mock/index.js
index ee04bff..fcf4dbf 100644
--- a/mock/index.js
+++ b/mock/index.js
@@ -44,11 +44,10 @@ function choice(a){ return a[ Math.floor(Math.random()*a.length) ]}
function populateMeals (userid) {
console.log(userid)
- let date = null
for (let i = 0; i < 30; i++) {
- date = new Date ()
- date.setDate( date.getDate() - i )
for (let j = 0, count = randrange(3,5); j < count; j++) {
+ let date = new Date ()
+ date.setDate( date.getDate() - i )
switch (j) {
case 0:
date.setHours(randrange(6,11))