refactor: rename score-leaderboard to PB leaderboard

This commit is contained in:
zkldi
2022-10-30 18:40:23 +00:00
parent f20b0c792a
commit b318fa44dc
5 changed files with 12 additions and 12 deletions
@@ -41,7 +41,7 @@ export default function GPTLeaderboardsPage({ game, playtype }: GamePT) {
</SelectButton>
<SelectButton id="score" value={mode} setValue={setMode}>
<Icon type="sort-numeric-up-alt" />
Score Leaderboards
PB Leaderboards
</SelectButton>
</div>
</Col>
@@ -53,7 +53,7 @@ export default function GPTLeaderboardsPage({ game, playtype }: GamePT) {
<ScoreLeaderboard
game={game}
playtype={playtype}
url={`/games/${game}/${playtype}/score-leaderboard`}
url={`/games/${game}/${playtype}/pb-leaderboard`}
/>
)}
</Col>
@@ -65,8 +65,8 @@ export default function RivalsComparePage({
<ScoreLeaderboard
game={game}
playtype={playtype}
refreshDeps={[`rivals-score-leaderboard-${settings.rivals.join(",")}`]}
url={`/users/${reqUser.id}/games/${game}/${playtype}/rivals/score-leaderboard`}
refreshDeps={[`rivals-pb-leaderboard-${settings.rivals.join(",")}`]}
url={`/users/${reqUser.id}/games/${game}/${playtype}/rivals/pb-leaderboard`}
/>
</Route>
+3 -3
View File
@@ -507,9 +507,9 @@ GET /api/v1/games/bms/7K/tableID/insane
*****
## Retrieve the score leaderboard for this Game.
## Retrieve the PB leaderboard for this Game.
`GET /api/v1/games/:game/:playtype/score-leaderboard`
`GET /api/v1/games/:game/:playtype/pb-leaderboard`
### Parameters
@@ -522,7 +522,7 @@ GET /api/v1/games/bms/7K/tableID/insane
| Property | Type | Description |
| :: | :: | :: |
| `pbs` | Array&lt;PBDocument&gt; | The array of pbs part of the score leaderboard. |
| `pbs` | Array&lt;PBDocument&gt; | The array of pbs part of the PB leaderboard. |
| `songs` | Array&lt;[SongDocument](../../schemas/song.md)&gt; | The array of songs part of the PBs. |
| `charts` | Array&lt;[ChartDocument](../../schemas/chart.md)&gt; | The array of charts part of the PBs. |
| `users` | Array&lt;[UserDocument](../../schemas/user.md)&gt; | The array of users part of the PBs. |
@@ -153,9 +153,9 @@ router.get("/leaderboard", async (req, res) => {
* @param alg - An alternative algorithm to use instead of the gpts default.
* @param limit - How many scores to return.
*
* @name GET /api/v1/games/:game/:playtype/score-leaderboard
* @name GET /api/v1/games/:game/:playtype/pb-leaderboard
*/
router.get("/score-leaderboard", async (req, res) => {
router.get("/pb-leaderboard", async (req, res) => {
const { game, playtype } = GetGPT(req);
const gptConfig = GetGamePTConfig(game, playtype);
@@ -103,7 +103,7 @@ router.get("/challengers", async (req, res) => {
});
/**
* Retrieve a "score leaderboard" for this user's set of rivals.
* Retrieve a "PB leaderboard" for this user's set of rivals.
*
* This is - effectively - the best 100 scores from this set of users on the given
* rating algorithm.
@@ -111,9 +111,9 @@ router.get("/challengers", async (req, res) => {
* @param alg - The score rating algorithm to sort on. Defaults to whatever the GPTConfig
* default is.
*
* @name GET /api/v1/users/:userID/games/:game/:playtype/rivals/score-leaderboard
* @name GET /api/v1/users/:userID/games/:game/:playtype/rivals/pb-leaderboard
*/
router.get("/score-leaderboard", async (req, res) => {
router.get("/pb-leaderboard", async (req, res) => {
const { user, game, playtype } = GetUGPT(req);
const gptConfig = GetGamePTConfig(game, playtype);