From aaee3529e9ebc1871ccb4cd64714fce34b77b9c8 Mon Sep 17 00:00:00 2001 From: Lawin0129 <56766256+Lawin0129@users.noreply.github.com> Date: Sat, 25 Dec 2021 18:46:55 +0000 Subject: [PATCH] Remove moment module --- index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 40361a6..c0b4c78 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,6 @@ const Express = require("express"); const express = Express(); const fs = require("fs"); -const moment = require("moment"); const crypto = require("crypto"); const path = require("path"); const config = require("./config.json"); @@ -1651,8 +1650,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/ClaimLoginReward", async (r var QueryRevision = req.query.rvn || -1; var StatChanged = false; - let CurrentDate = new Date(); - var DateFormat = moment(CurrentDate).format('YYYY-MM-DD') + "T00:00:00.000Z"; + var DateFormat = (new Date().toISOString()).split("T")[0] + "T00:00:00.000Z"; if (profile.stats.attributes.daily_rewards.lastClaimDate != DateFormat) { profile.stats.attributes.daily_rewards.nextDefaultReward += 1; @@ -5821,4 +5819,4 @@ function makeid() { let ID = crypto.createHash('md5').update(CurrentDate + RandomFloat).digest('hex'); let FinishedID = ID.slice(0, 8) + "-" + ID.slice(8, 12) + "-" + ID.slice(12, 16) + "-" + ID.slice(16, 20) + "-" + ID.slice(20, 32); return FinishedID; -} \ No newline at end of file +}