From caeba1197c4b66e10614ffbddce0a2e98b0b5ef3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 24 May 2017 20:50:17 +0900 Subject: Refactoring --- src/api/endpoints/aggregation/users/post.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/api/endpoints/aggregation/users/post.ts') diff --git a/src/api/endpoints/aggregation/users/post.ts b/src/api/endpoints/aggregation/users/post.ts index cb6bae4970..c964815a0c 100644 --- a/src/api/endpoints/aggregation/users/post.ts +++ b/src/api/endpoints/aggregation/users/post.ts @@ -84,7 +84,7 @@ module.exports = (params) => new Promise(async (res, rej) => { const graph = []; for (let i = 0; i < 30; i++) { - let day = new Date(new Date().setDate(new Date().getDate() - i)); + const day = new Date(new Date().setDate(new Date().getDate() - i)); const data = datas.filter(d => d.date.year == day.getFullYear() && d.date.month == day.getMonth() + 1 && d.date.day == day.getDate() -- cgit v1.2.3-freya