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 17:11:00 +01:00
committed by Alexis Sellier
parent 3f0141b087
commit da96a82fc1
2 changed files with 2 additions and 2 deletions
+1 -1
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>,
+1 -1
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>,