aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index 0c33930..a1da3e1 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,6 +1,6 @@
import { fetchMemberProfile, fetchUser } from './hypixel'
import express from 'express'
-import { fetchMemberLeaderboard } from './database'
+import { fetchAllMemberLeaderboardAttributes, fetchMemberLeaderboard } from './database'
const app = express()
@@ -40,5 +40,12 @@ app.get('/leaderboard/:name', async(req, res) => {
)
})
+app.get('/leaderboards', async(req, res) => {
+ res.json(
+ await fetchAllMemberLeaderboardAttributes()
+ )
+})
+
+
app.listen(8080, () => console.log('App started :)'))