mirror of
https://github.com/Steffo99/distributed-arcade.git
synced 2024-11-24 00:54:26 +00:00
Rename /board/
body struct to RouteBoardBody
This commit is contained in:
parent
8a2af8d6f2
commit
ea90ad7b51
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ use crate::utils::token::SecureToken;
|
||||||
|
|
||||||
/// Expected input data for [`POST /board/`](route_board_post).
|
/// Expected input data for [`POST /board/`](route_board_post).
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub(crate) struct RouteBoardPostInput {
|
pub(crate) struct RouteBoardBody {
|
||||||
/// The name of the board to create.
|
/// The name of the board to create.
|
||||||
pub(crate) name: String,
|
pub(crate) name: String,
|
||||||
/// The [`SortingOrder`] of the scores in the board to create.
|
/// The [`SortingOrder`] of the scores in the board to create.
|
||||||
|
@ -46,7 +46,7 @@ async fn ensure_key_is_empty(rconn: &mut redis::aio::Connection, key: &str) -> R
|
||||||
/// If successful, returns [`StatusCode::CREATED`].
|
/// If successful, returns [`StatusCode::CREATED`].
|
||||||
pub(crate) async fn route_board_post(
|
pub(crate) async fn route_board_post(
|
||||||
Extension(rclient): Extension<redis::Client>,
|
Extension(rclient): Extension<redis::Client>,
|
||||||
Json(RouteBoardPostInput {name, order}): Json<RouteBoardPostInput>,
|
Json(RouteBoardBody {name, order}): Json<RouteBoardBody>,
|
||||||
) -> outcome::RequestResult {
|
) -> outcome::RequestResult {
|
||||||
|
|
||||||
let name = name.to_kebab_lowercase();
|
let name = name.to_kebab_lowercase();
|
||||||
|
|
Loading…
Reference in a new issue