mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-04 03:00:32 +08:00
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:
committed by
Alexis Sellier
parent
3f0141b087
commit
da96a82fc1
@@ -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>,
|
||||
|
||||
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user