Skip to content

Commit

Permalink
adds comments and fixes up some formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrltrent authored and minitech committed Apr 9, 2023
1 parent 602d231 commit 179c08a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,5 @@ paths:
properties:
BadRequest:
type: string
'401':
$ref: '#/components/responses/unauthenticated'
'500':
$ref: '#/components/responses/unexpected'
5 changes: 5 additions & 0 deletions src/services/comments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ pub async fn delete_comment(
}
}

/// The types of comment fetching options.
///
/// - `Root': Fetches the root comments of a post.
/// - `Thread': Fetches comments based off a specified comment.
#[derive(Deserialize)]
#[serde(tag = "kind", rename_all = "kebab-case")]
pub enum ListQuery {
Expand All @@ -38,6 +42,7 @@ pub enum ListQuery {
},
}

/// The endpoint for fetching commments.
#[get("/comments/")]
pub async fn get_comment(
db: web::Data<Database>,
Expand Down

0 comments on commit 179c08a

Please sign in to comment.