From f01f4926eb55cd14635d4bdabb8e433bb98478c6 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Mon, 26 Nov 2018 10:00:57 +0200 Subject: [PATCH] Random timestamps --- client/src/modules/bdwebapi.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/modules/bdwebapi.js b/client/src/modules/bdwebapi.js index 6ed67a92..0bb3e588 100644 --- a/client/src/modules/bdwebapi.js +++ b/client/src/modules/bdwebapi.js @@ -34,6 +34,7 @@ const dummyFiles = { }] }; const dummyAuthor = 'DummyAuthor'; +const dummyTimestamp = () => `2018-${Math.floor((Math.random() * 12) + 1).toString().padStart(2, '0')}-${Math.floor((Math.random() * 30) + 1).toString().padStart(2, '0')}T14:51:32.057Z`; async function dummyThemes() { // Simulate get @@ -45,7 +46,7 @@ async function dummyThemes() { name: `Dummy ${i}`, tags: dummyTags, installs: Math.floor(Math.random() * 10000), - updated: '2018-07-21T14:51:32.057Z', + updated: dummyTimestamp(), rating: Math.floor(Math.random() * 1000), activeUsers: Math.floor(Math.random() * 1000), rated: Math.random() > .5,