Skip to content

Commit

Permalink
Update comments endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
augustuswm committed Dec 23, 2024
1 parent 6b9b132 commit d340273
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<()>, HttpError> {
Expand Down Expand Up @@ -260,10 +260,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<()>, HttpError> {
Expand Down Expand Up @@ -422,7 +422,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,

Check warning on line 426 in rfd-api/src/endpoints/rfd.rs

View workflow job for this annotation

GitHub Actions / build

unused variable: `ctx`

Check warning on line 426 in rfd-api/src/endpoints/rfd.rs

View workflow job for this annotation

GitHub Actions / build

unused variable: `ctx`
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 d340273

Please sign in to comment.