Skip to content

Commit

Permalink
docs: Completed documentation for StelaeQueryData
Browse files Browse the repository at this point in the history
  • Loading branch information
BojanG99 committed Jan 9, 2025
1 parent fb256c5 commit ea02fe0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/server/api/stelae/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub async fn get_blob(
) -> impl Responder {
let (namespace, name) = path.into_inner();
let query_data: StelaeQueryData = query.into_inner();
let commitish = query_data.commitish.unwrap_or_default();
let commitish = query_data.commitish;
let remainder = query_data.remainder.unwrap_or_default();
let archive_path = &data;
let blob = Repo::find_blob(archive_path, &namespace, &name, &remainder, &commitish);
Expand Down
8 changes: 4 additions & 4 deletions src/server/api/stelae/request/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use serde::Deserialize;
/// Structure for
/// Structure for passing query parameters for stelae endpoint
#[derive(Debug, Deserialize)]
pub struct StelaeQueryData {
/// commit of the repo
pub commitish: Option<String>,
/// path of the file
/// commit (or reference) to the repo. Can pass in `HEAD`, a branch ref (e.g. main), or a commit SHA.
pub commitish: String,
/// path of the file (e.g. \us\ca\cities\san-mateo\index.html). If nothing is passed by default it will look for index.html
pub remainder: Option<String>,
}

0 comments on commit ea02fe0

Please sign in to comment.