Make the berry endpoint use GET instead of POST

This commit is contained in:
2025-12-17 19:30:16 -07:00
parent 10389d8da9
commit 3bea2007e7
2 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ app.get('/launcher/loader/update-data', context =>
app.get('/berrydash/leaderboards/score', context => app.get('/berrydash/leaderboards/score', context =>
berrydashLeaderboardsHandler(context, 0) berrydashLeaderboardsHandler(context, 0)
) )
app.post('/berrydash/leaderboards/berry', context => app.get('/berrydash/leaderboards/berry', context =>
berrydashLeaderboardsHandler(context, 1) berrydashLeaderboardsHandler(context, 1)
) )
app.get('/berrydash/leaderboards/coin', context => app.get('/berrydash/leaderboards/coin', context =>

View File

@@ -21,8 +21,8 @@ export async function handler (context: Context, type: number) {
if (type == 0) { if (type == 0) {
request_value = 'highScore' request_value = 'highScore'
} else if (type == 1) { } else if (type == 1) {
const body = context.body as { type: number } let berryQuery = context.query.berry ? parseInt(context.query.berry, 10) : 0
switch (body.type) { switch (berryQuery) {
case 1: case 1:
request_value = 'totalPoisonBerries' request_value = 'totalPoisonBerries'
break break