aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts7
1 files changed, 7 insertions, 0 deletions
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)