feat: profileStats endpoint for U8
All checks were successful
Build / build (pull_request) Successful in 1m58s
All checks were successful
Build / build (pull_request) Successful in 1m58s
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import type { RequestHandler } from "express";
|
||||
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
||||
import { getInventory } from "../../services/inventoryService.ts";
|
||||
import { getStats } from "../../services/statsService.ts";
|
||||
import type { IStatsClient } from "../../types/statTypes.ts";
|
||||
|
||||
const viewController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const accountId = String(req.query.id ?? req.query.lookupId);
|
||||
const inventory = await getInventory(accountId, "XPInfo");
|
||||
const playerStats = await getStats(accountId);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { leaderboardController } from "../controllers/stats/leaderboardControlle
|
||||
const statsRouter = express.Router();
|
||||
|
||||
statsRouter.get("/view.php", viewController);
|
||||
statsRouter.get("/profileStats.php", viewController);
|
||||
statsRouter.post("/upload.php", uploadController);
|
||||
statsRouter.post("/leaderboardWeekly.php", leaderboardController);
|
||||
statsRouter.post("/leaderboardArchived.php", leaderboardController);
|
||||
|
||||
Reference in New Issue
Block a user