From fbd9446806ad3535435729179276ecca4df319d5 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sun, 2 May 2021 20:38:28 -0500 Subject: add `/constants` api to get max minions and fairy souls (#21) --- src/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/index.ts') diff --git a/src/index.ts b/src/index.ts index d25efc9..1652428 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import { fetchAllLeaderboardsCategorized, fetchLeaderboard, fetchMemberLeaderboardSpots } from './database' import { fetchMemberProfile, fetchUser } from './hypixel' import rateLimit from 'express-rate-limit' +import * as constants from './constants' import express from 'express' const app = express() @@ -68,6 +69,12 @@ app.get('/leaderboards', async(req, res) => { ) }) +app.get('/constants', async(req, res) => { + res.json( + await constants.fetchConstantValues() + ) +}) + // only run the server if it's not doing tests if (!globalThis.isTest) -- cgit