diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-28 16:03:55 -0600 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-28 16:03:55 -0600 |
commit | f54b3b138db5eb566e5027c458ba77ef5f3560c7 (patch) | |
tree | 0effc0726f2663080798117b035acd7c4f9ce056 /src/index.ts | |
parent | 13985abd157d8339dc9db7137dc9b86ee7a0a616 (diff) | |
download | skyblock-api-f54b3b138db5eb566e5027c458ba77ef5f3560c7.tar.gz skyblock-api-f54b3b138db5eb566e5027c458ba77ef5f3560c7.tar.bz2 skyblock-api-f54b3b138db5eb566e5027c458ba77ef5f3560c7.zip |
add /leaderboards
Diffstat (limited to 'src/index.ts')
-rw-r--r-- | src/index.ts | 9 |
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 :)')) |