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:
parent
ed1120f3eb
commit
d40f40b9af
|
|
@ -109,7 +109,7 @@ async fn root_handler() -> impl IntoResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone)]
|
#[derive(Serialize, Deserialize, Clone)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct PaginationQuery {
|
pub struct PaginationQuery {
|
||||||
pub page: Option<usize>,
|
pub page: Option<usize>,
|
||||||
pub per_page: Option<usize>,
|
pub per_page: Option<usize>,
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ async fn project_handler(State(ctx): State<Context>, Path(id): Path<Id>) -> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone)]
|
#[derive(Serialize, Deserialize, Clone)]
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct CommitsQueryString {
|
pub struct CommitsQueryString {
|
||||||
pub parent: Option<String>,
|
pub parent: Option<String>,
|
||||||
pub since: Option<i64>,
|
pub since: Option<i64>,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue