Skip to content

Commit 3cafa8e

Browse files
committed
refactor: Rename MMR functions for clarity and update API path parameters
1 parent bf984d4 commit 3cafa8e

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/routes/v1/matches/custom/ready.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ pub(crate) struct LobbyIdQuery {
2222
#[utoipa::path(
2323
post,
2424
path = "/{lobby_id}/ready",
25+
params(LobbyIdQuery),
2526
responses(
2627
(status = 200, description = "Successfully ready up."),
2728
(status = BAD_REQUEST, description = "Provided parameters are invalid."),
@@ -76,6 +77,7 @@ pub(super) async fn ready_up(
7677
#[utoipa::path(
7778
post,
7879
path = "/{lobby_id}/unready",
80+
params(LobbyIdQuery),
7981
responses(
8082
(status = 200, description = "Successfully unready."),
8183
(status = BAD_REQUEST, description = "Provided parameters are invalid."),

src/routes/v1/players/mmr/distribution.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ fn build_hero_mmr_distribution_query(hero_id: u8, query: &MMRDistributionQuery)
177177
Player MMR Distribution
178178
",
179179
)]
180-
pub(super) async fn mmr(
180+
pub(super) async fn mmr_distribution(
181181
State(state): State<AppState>,
182182
Query(query): Query<MMRDistributionQuery>,
183183
) -> APIResult<impl IntoResponse> {
@@ -206,7 +206,7 @@ pub(super) async fn mmr(
206206
Player Hero MMR Distribution
207207
",
208208
)]
209-
pub(super) async fn hero_mmr(
209+
pub(super) async fn hero_mmr_distribution(
210210
Path(HeroMMRPath { hero_id }): Path<HeroMMRPath>,
211211
Query(query): Query<MMRDistributionQuery>,
212212
State(state): State<AppState>,

src/routes/v1/players/mmr/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ struct ApiDoc;
3333

3434
pub(super) fn router() -> OpenApiRouter<AppState> {
3535
OpenApiRouter::with_openapi(ApiDoc::openapi())
36-
.routes(routes!(distribution::mmr))
37-
.routes(routes!(distribution::hero_mmr))
36+
.routes(routes!(distribution::mmr_distribution))
37+
.routes(routes!(distribution::hero_mmr_distribution))
3838
.routes(routes!(batch::mmr))
3939
.routes(routes!(batch::hero_mmr))
4040
.routes(routes!(mmr_history::mmr_history))

0 commit comments

Comments
 (0)