diff options
Diffstat (limited to 'build/index.js')
-rw-r--r-- | build/index.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/build/index.js b/build/index.js index e547a72..f428eb0 100644 --- a/build/index.js +++ b/build/index.js @@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.debug = void 0; -const hypixel_1 = require("./hypixel"); -const express_1 = __importDefault(require("express")); const database_1 = require("./database"); +const hypixel_1 = require("./hypixel"); const express_rate_limit_1 = __importDefault(require("express-rate-limit")); +const express_1 = __importDefault(require("express")); const app = express_1.default(); exports.debug = true; // 500 requests over 5 minutes @@ -32,6 +32,9 @@ app.get('/player/:user', async (req, res) => { app.get('/player/:user/:profile', async (req, res) => { res.json(await hypixel_1.fetchMemberProfile(req.params.user, req.params.profile)); }); +app.get('/player/:user/:profile/leaderboards', async (req, res) => { + res.json(await database_1.fetchMemberLeaderboardSpots(req.params.user, req.params.profile)); +}); app.get('/leaderboard/:name', async (req, res) => { res.json(await database_1.fetchMemberLeaderboard(req.params.name)); }); |