Skip to content

Commit

Permalink
Merge branch 'api-v2' into comments
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Dec 23, 2024
2 parents 41a01d0 + d340273 commit a6a15b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions rfd-api/src/endpoints/rfd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ pub async fn view_rfd_attr(
#[trace_request]
#[endpoint {
method = GET,
path = "/rfd/{number}/comments",
path = "/rfd/{number}/discussion",
}]
#[instrument(skip(rqctx), fields(request_id = rqctx.request_id), err(Debug))]
pub async fn view_rfd_comments(
pub async fn view_rfd_discussion(
rqctx: RequestContext<RfdContext>,
path: Path<RfdPathParams>,
) -> Result<HttpResponseOk<Vec<RfdReviewComment>>, HttpError> {
Expand Down Expand Up @@ -263,10 +263,10 @@ pub async fn view_rfd_revision_attr(
#[trace_request]
#[endpoint {
method = GET,
path = "/rfd/{number}/revision/{revision}/comments",
path = "/rfd/{number}/revision/{revision}/discussion",
}]
#[instrument(skip(rqctx), fields(request_id = rqctx.request_id), err(Debug))]
pub async fn view_rfd_revision_comments(
pub async fn view_rfd_revision_discussion(
rqctx: RequestContext<RfdContext>,
path: Path<RfdRevisionPathParams>,
) -> Result<HttpResponseOk<Vec<RfdReviewComment>>, HttpError> {
Expand Down Expand Up @@ -428,7 +428,7 @@ async fn view_rfd_attr_op(
}

#[instrument(skip(ctx, caller), fields(caller = ?caller.id), err(Debug))]
async fn view_rfd_comments_op(
async fn view_rfd_discussion_op(
ctx: &RfdContext,
caller: &Caller<RfdPermission>,
number: String,
Expand Down
8 changes: 4 additions & 4 deletions rfd-api/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use crate::{
rfd::{
discuss_rfd, list_rfds, publish_rfd, reserve_rfd, search_rfds, set_rfd_attr,
set_rfd_content, set_rfd_document, update_rfd_visibility, view_rfd, view_rfd_attr,
view_rfd_comments, view_rfd_meta, view_rfd_pdf, view_rfd_revision,
view_rfd_revision_attr, view_rfd_revision_comments, view_rfd_revision_meta,
view_rfd_discussion, view_rfd_meta, view_rfd_pdf, view_rfd_revision,
view_rfd_revision_attr, view_rfd_revision_discussion, view_rfd_revision_meta,
view_rfd_revision_pdf,
},
webhook::github_webhook,
Expand Down Expand Up @@ -86,7 +86,7 @@ pub fn server(
.expect("Failed to register endpoint");
api.register(view_rfd_attr)
.expect("Failed to register endpoint");
api.register(view_rfd_comments)
api.register(view_rfd_discussion)
.expect("Failed to register endpoint");

api.register(view_rfd_revision_meta)
Expand All @@ -97,7 +97,7 @@ pub fn server(
.expect("Failed to register endpoint");
api.register(view_rfd_revision_attr)
.expect("Failed to register endpoint");
api.register(view_rfd_revision_comments)
api.register(view_rfd_revision_discussion)
.expect("Failed to register endpoint");

api.register(search_rfds)
Expand Down

0 comments on commit a6a15b6

Please sign in to comment.