Skip to content

Commit

Permalink
Add maps info
Browse files Browse the repository at this point in the history
  • Loading branch information
petrvecera committed Oct 31, 2024
1 parent f596e00 commit 448bfa9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pages/api/getLatestPatchMapStats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { NextApiRequest, NextApiResponse } from "next";
import config from "../../config";
import { generateExpireTimeStamps, getGMTTimeStamp } from "../../src/utils";
import { getStatsData } from "../../src/apis/coh3stats-api";
import { maps } from "../../src/coh3/coh3-data";

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
try {
Expand All @@ -20,9 +21,14 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
},
);

// Remove the days object, we don't need it, lowers the amount of data
// @ts-ignore
data.analysis.days = undefined;

const response = {
latestPatchInfo: statsPatchSelector[config.latestPatch],
mapStats: data,
mapInfo: maps,
};

res
Expand Down

0 comments on commit 448bfa9

Please sign in to comment.