httpd: Use camelCase in query params

It's more ergonomic to consume in JS/TS.

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš 2023-03-17 15:53:22 +01:00 committed by Alexis Sellier
parent ed1120f3eb
commit d40f40b9af
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ async fn root_handler() -> impl IntoResponse {
}
#[derive(Serialize, Deserialize, Clone)]
#[serde(rename_all = "kebab-case")]
#[serde(rename_all = "camelCase")]
pub struct PaginationQuery {
pub page: Option<usize>,
pub per_page: Option<usize>,

View File

@ -114,7 +114,7 @@ async fn project_handler(State(ctx): State<Context>, Path(id): Path<Id>) -> impl
}
#[derive(Serialize, Deserialize, Clone)]
#[serde(rename_all = "kebab-case")]
#[serde(rename_all = "camelCase")]
pub struct CommitsQueryString {
pub parent: Option<String>,
pub since: Option<i64>,