diff --git a/src/index.ts b/src/index.ts index df11801..f23312d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,7 +8,7 @@ import { handler as launcherVersionsHandler } from './routes/launcher/versions' import { handler as launcherLatestHandler } from './routes/launcher/latest' import { handler as launcherLoaderLatestHandler } from './routes/launcher/loader/latest' import { handler as launcherLoaderUpdateDataHandler } from './routes/launcher/loader/update-data' -import { handler as berrydashLeaderboardsHandler } from './routes/berrydash/leaderboards' +import { handler as berrydashLeaderboardsGetHandler } from './routes/berrydash/leaderboards/get' import { handler as berrydashProfileGetHandler } from './routes/berrydash/profile/get' import { handler as berrydashProfilePostsDeleteHandler } from './routes/berrydash/profile/posts/delete' import { handler as berrydashProfilePostsGetHandler } from './routes/berrydash/profile/posts/get' @@ -32,19 +32,19 @@ app.get('/launcher/loader/update-data', context => launcherLoaderUpdateDataHandler(context) ) app.get('/berrydash/leaderboards/score', context => - berrydashLeaderboardsHandler(context, 0) + berrydashLeaderboardsGetHandler(context, 0) ) app.get('/berrydash/leaderboards/berry', context => - berrydashLeaderboardsHandler(context, 1) + berrydashLeaderboardsGetHandler(context, 1) ) app.get('/berrydash/leaderboards/coin', context => - berrydashLeaderboardsHandler(context, 2) + berrydashLeaderboardsGetHandler(context, 2) ) app.get('/berrydash/leaderboards/legacy', context => - berrydashLeaderboardsHandler(context, 3) + berrydashLeaderboardsGetHandler(context, 3) ) app.get('/berrydash/leaderboards/total', context => - berrydashLeaderboardsHandler(context, 4) + berrydashLeaderboardsGetHandler(context, 4) ) app.get('/berrydash/profile', context => berrydashProfileGetHandler(context)) app.delete('/berrydash/profile/posts', context => diff --git a/src/routes/berrydash/leaderboards.ts b/src/routes/berrydash/leaderboards/get.ts similarity index 97% rename from src/routes/berrydash/leaderboards.ts rename to src/routes/berrydash/leaderboards/get.ts index 5a5d7d3..3800f7f 100644 --- a/src/routes/berrydash/leaderboards.ts +++ b/src/routes/berrydash/leaderboards/get.ts @@ -1,10 +1,10 @@ import { Context } from 'elysia' -import { getDatabaseConnection, jsonResponse } from '../../lib/util' +import { getDatabaseConnection, jsonResponse } from '../../../lib/util' import { berryDashMarketplaceIcons, berryDashUserData, users -} from '../../lib/tables' +} from '../../../lib/tables' import { eq } from 'drizzle-orm' export async function handler (context: Context, type: number) {