Rename /berrydash/leaderboards to /berrydash/leaderboard to solve inconsistencies
This commit is contained in:
83
src/index.ts
83
src/index.ts
@@ -11,7 +11,7 @@ import { handler as launcherLatestHandler } from './routes/launcher/latest'
|
|||||||
import { handler as launcherLoaderLatestHandler } from './routes/launcher/loader/latest'
|
import { handler as launcherLoaderLatestHandler } from './routes/launcher/loader/latest'
|
||||||
import { handler as launcherLoaderUpdateDataHandler } from './routes/launcher/loader/update-data'
|
import { handler as launcherLoaderUpdateDataHandler } from './routes/launcher/loader/update-data'
|
||||||
|
|
||||||
import { handler as berrydashLeaderboardsGetHandler } from './routes/berrydash/leaderboards/get'
|
import { handler as berrydashLeaderboardGetHandler } from './routes/berrydash/leaderboard/get'
|
||||||
|
|
||||||
import { handler as berrydashProfileGetHandler } from './routes/berrydash/profile/get'
|
import { handler as berrydashProfileGetHandler } from './routes/berrydash/profile/get'
|
||||||
import { handler as berrydashProfilePostsDeleteHandler } from './routes/berrydash/profile/posts/delete'
|
import { handler as berrydashProfilePostsDeleteHandler } from './routes/berrydash/profile/posts/delete'
|
||||||
@@ -105,7 +105,70 @@ app.get(
|
|||||||
)
|
)
|
||||||
app.get(
|
app.get(
|
||||||
'/berrydash/leaderboards/score',
|
'/berrydash/leaderboards/score',
|
||||||
context => berrydashLeaderboardsGetHandler(context, 0),
|
context => berrydashLeaderboardGetHandler(context, 0),
|
||||||
|
{
|
||||||
|
detail: {
|
||||||
|
deprecated: true,
|
||||||
|
description:
|
||||||
|
'This endpoint is identical to `/berrydash/leaderboards/score` and will be removed in the future. The naming was inconsistent with other endpoints, this is the reason for this change.',
|
||||||
|
tags: ['Berry Dash', 'Leaderboards']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
app.get(
|
||||||
|
'/berrydash/leaderboards/berry',
|
||||||
|
context => berrydashLeaderboardGetHandler(context, 1),
|
||||||
|
{
|
||||||
|
detail: {
|
||||||
|
deprecated: true,
|
||||||
|
description:
|
||||||
|
'This endpoint is identical to `/berrydash/leaderboards/berry` and will be removed in the future. The naming was inconsistent with other endpoints, this is the reason for this change.',
|
||||||
|
tags: ['Berry Dash', 'Leaderboards']
|
||||||
|
},
|
||||||
|
query: t.Object({
|
||||||
|
berry: t.String()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
|
app.get(
|
||||||
|
'/berrydash/leaderboards/coin',
|
||||||
|
context => berrydashLeaderboardGetHandler(context, 2),
|
||||||
|
{
|
||||||
|
detail: {
|
||||||
|
deprecated: true,
|
||||||
|
description:
|
||||||
|
'This endpoint is identical to `/berrydash/leaderboards/coin` and will be removed in the future. The naming was inconsistent with other endpoints, this is the reason for this change.',
|
||||||
|
tags: ['Berry Dash', 'Leaderboards']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
app.get(
|
||||||
|
'/berrydash/leaderboards/legacy',
|
||||||
|
context => berrydashLeaderboardGetHandler(context, 3),
|
||||||
|
{
|
||||||
|
detail: {
|
||||||
|
deprecated: true,
|
||||||
|
description:
|
||||||
|
'This endpoint is identical to `/berrydash/leaderboards/legacy` and will be removed in the future. The naming was inconsistent with other endpoints, this is the reason for this change.',
|
||||||
|
tags: ['Berry Dash', 'Leaderboards']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
app.get(
|
||||||
|
'/berrydash/leaderboards/total',
|
||||||
|
context => berrydashLeaderboardGetHandler(context, 4),
|
||||||
|
{
|
||||||
|
detail: {
|
||||||
|
deprecated: true,
|
||||||
|
description:
|
||||||
|
'This endpoint is identical to `/berrydash/leaderboards/total` and will be removed in the future. The naming was inconsistent with other endpoints, this is the reason for this change.',
|
||||||
|
tags: ['Berry Dash', 'Leaderboards']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
app.get(
|
||||||
|
'/berrydash/leaderboard/score',
|
||||||
|
context => berrydashLeaderboardGetHandler(context, 0),
|
||||||
{
|
{
|
||||||
detail: {
|
detail: {
|
||||||
description: 'The endpoint for getting the score leaderboards.',
|
description: 'The endpoint for getting the score leaderboards.',
|
||||||
@@ -114,8 +177,8 @@ app.get(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
app.get(
|
app.get(
|
||||||
'/berrydash/leaderboards/berry',
|
'/berrydash/leaderboard/berry',
|
||||||
context => berrydashLeaderboardsGetHandler(context, 1),
|
context => berrydashLeaderboardGetHandler(context, 1),
|
||||||
{
|
{
|
||||||
detail: {
|
detail: {
|
||||||
description:
|
description:
|
||||||
@@ -128,8 +191,8 @@ app.get(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
app.get(
|
app.get(
|
||||||
'/berrydash/leaderboards/coin',
|
'/berrydash/leaderboard/coin',
|
||||||
context => berrydashLeaderboardsGetHandler(context, 2),
|
context => berrydashLeaderboardGetHandler(context, 2),
|
||||||
{
|
{
|
||||||
detail: {
|
detail: {
|
||||||
description: 'The endpoint for getting the coin leaderboards.',
|
description: 'The endpoint for getting the coin leaderboards.',
|
||||||
@@ -138,8 +201,8 @@ app.get(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
app.get(
|
app.get(
|
||||||
'/berrydash/leaderboards/legacy',
|
'/berrydash/leaderboard/legacy',
|
||||||
context => berrydashLeaderboardsGetHandler(context, 3),
|
context => berrydashLeaderboardGetHandler(context, 3),
|
||||||
{
|
{
|
||||||
detail: {
|
detail: {
|
||||||
description: 'The endpoint for getting the legacy leaderboards.',
|
description: 'The endpoint for getting the legacy leaderboards.',
|
||||||
@@ -148,8 +211,8 @@ app.get(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
app.get(
|
app.get(
|
||||||
'/berrydash/leaderboards/total',
|
'/berrydash/leaderboard/total',
|
||||||
context => berrydashLeaderboardsGetHandler(context, 4),
|
context => berrydashLeaderboardGetHandler(context, 4),
|
||||||
{
|
{
|
||||||
detail: {
|
detail: {
|
||||||
description: 'The endpoint for getting the total leaderboards.',
|
description: 'The endpoint for getting the total leaderboards.',
|
||||||
|
|||||||
Reference in New Issue
Block a user