diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-05-02 20:38:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 20:38:28 -0500 |
commit | fbd9446806ad3535435729179276ecca4df319d5 (patch) | |
tree | 83b3ea672dac268417d93ac236eafc3c6fd3debe /src/index.ts | |
parent | fd7991ba7318b32027db8dbe9160490e8652b199 (diff) | |
download | skyblock-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.ts | 7 |
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) |