mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-13 02:42:22 +01:00
Remove moment module
This commit is contained in:
6
index.js
6
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user