aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-05-02 20:38:28 -0500
committerGitHub <noreply@github.com>2021-05-02 20:38:28 -0500
commitfbd9446806ad3535435729179276ecca4df319d5 (patch)
tree83b3ea672dac268417d93ac236eafc3c6fd3debe /src/index.ts
parentfd7991ba7318b32027db8dbe9160490e8652b199 (diff)
downloadskyblock-api-fbd9446806ad3535435729179276ecca4df319d5.tar.gz
skyblock-api-fbd9446806ad3535435729179276ecca4df319d5.tar.bz2
skyblock-api-fbd9446806ad3535435729179276ecca4df319d5.zip
add `/constants` api to get max minions and fairy souls (#21)
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)