Skip to content

Commit

Permalink
clarify existing crate_owner_invitations APIs are in the v1 namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Jun 27, 2021
1 parent 6efd0b7 commit 7a8735d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/controllers/crate_owner_invitation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::views::{EncodableCrateOwnerInvitation, EncodablePublicUser, Invitatio
use diesel::dsl::any;
use std::collections::HashMap;

/// Handles the `GET /me/crate_owner_invitations` route.
/// Handles the `GET /api/v1/me/crate_owner_invitations` route.
pub fn list(req: &mut dyn RequestExt) -> EndpointResult {
// Ensure that the user is authenticated
let user = req.authenticate()?.forbid_api_token_auth()?.user();
Expand Down Expand Up @@ -88,7 +88,7 @@ struct OwnerInvitation {
crate_owner_invite: InvitationResponse,
}

/// Handles the `PUT /me/crate_owner_invitations/:crate_id` route.
/// Handles the `PUT /api/v1/me/crate_owner_invitations/:crate_id` route.
pub fn handle_invite(req: &mut dyn RequestExt) -> EndpointResult {
let mut body = String::new();
req.body().read_to_string(&mut body)?;
Expand Down Expand Up @@ -117,7 +117,7 @@ pub fn handle_invite(req: &mut dyn RequestExt) -> EndpointResult {
}))
}

/// Handles the `PUT /me/crate_owner_invitations/accept/:token` route.
/// Handles the `PUT /api/v1/me/crate_owner_invitations/accept/:token` route.
pub fn handle_invite_with_token(req: &mut dyn RequestExt) -> EndpointResult {
let config = &req.app().config;
let conn = req.db_conn()?;
Expand Down

0 comments on commit 7a8735d

Please sign in to comment.