diff options
| author | Jules Laplace <jules@okfoc.us> | 2017-03-20 01:03:23 +0100 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2017-03-20 01:03:23 +0100 |
| commit | bf7ac6af587f68553b83a54fcb724dfc9d684644 (patch) | |
| tree | c08ae482e8a7a5804018aab2610771fed64c5855 /mock | |
| parent | 29c18b202b291304ee8b08c2387b25542f76c414 (diff) | |
refactor frontend
Diffstat (limited to 'mock')
| -rw-r--r-- | mock/index.js | 5 |
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)) |
