1
Fork 0
mirror of https://github.com/Steffo99/distributed-arcade.git synced 2024-11-27 18:44:24 +00:00

Rename /board/ body struct to RouteBoardBody

This commit is contained in:
Steffo 2022-11-12 16:38:55 +01:00
parent 8a2af8d6f2
commit ea90ad7b51
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -15,7 +15,7 @@ use crate::utils::token::SecureToken;
/// Expected input data for [`POST /board/`](route_board_post).
#[derive(Clone, Debug, Serialize, Deserialize)]
pub(crate) struct RouteBoardPostInput {
pub(crate) struct RouteBoardBody {
/// The name of the board to create.
pub(crate) name: String,
/// 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`].
pub(crate) async fn route_board_post(
Extension(rclient): Extension<redis::Client>,
Json(RouteBoardPostInput {name, order}): Json<RouteBoardPostInput>,
Json(RouteBoardBody {name, order}): Json<RouteBoardBody>,
) -> outcome::RequestResult {
let name = name.to_kebab_lowercase();