diff --git a/initdatas/activity_info.json b/initdatas/activity_info.json index bec0186..704ea55 100644 --- a/initdatas/activity_info.json +++ b/initdatas/activity_info.json @@ -32,7 +32,7 @@ "start": "2024-01-01 00:00", "end": "2025-01-01 00:00", "checkChain": true, - "params": {"time": 6, "failRate": 60} + "params": {"time": 6, "failRate": 0} }, { "id": "e2feyflj30vwcpe0sjy", "task": "TwitterFollow", @@ -47,7 +47,7 @@ "start": "2024-01-01 00:00", "end": "2025-01-01 00:00", "checkChain": true, - "params": {"time": 6, "failRate": 60} + "params": {"time": 6, "failRate": 0} }, { "id": "e2fuah0j30vwcpe0my7", "task": "TwitterRetweet", @@ -62,7 +62,7 @@ "start": "2024-01-01 00:00", "end": "2025-01-01 00:00", "checkChain": true, - "params": {"time": 6, "failRate": 60} + "params": {"time": 6, "failRate": 0} } ], "startTime": 1711086450119, diff --git a/src/controllers/game.controller.ts b/src/controllers/game.controller.ts index 2df7d3c..6189498 100644 --- a/src/controllers/game.controller.ts +++ b/src/controllers/game.controller.ts @@ -63,6 +63,11 @@ class GameController extends BaseController { days = '1month' } else if (tag === 'last') { days = '1' + } else if (tag === 'all') { + const start = new Date(req.activity.start).getTime() + // calc days from start to now + const now = new Date().getTime() + days = Math.floor((now - start) / 86400000) } const res = await queryCheckInList(user.address.toLowerCase(), days, 0) return res