Skip to content

Commit

Permalink
refactor: rename UserJWTAuth and change endpoint for accept invite api
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisIsMani committed Jan 17, 2024
1 parent fb3194c commit e769dce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/router/src/routes/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ impl User {
.service(web::resource("/role/list").route(web::get().to(list_roles)))
.service(web::resource("/role/{role_id}").route(web::get().to(get_role)))
.service(web::resource("/user/invite").route(web::post().to(invite_user)))
.service(web::resource("/user/accept_invite").route(web::post().to(accept_invitation)))
.service(web::resource("/user/invite/accept").route(web::post().to(accept_invitation)))
.service(
web::resource("/data")
.route(web::get().to(get_multiple_dashboard_metadata))
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/routes/user_role.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub async fn accept_invitation(
&req,
payload,
user_role_core::accept_invitation,
&auth::UserJWTAuth,
&auth::UserWithoutMerchantJWTAuth,
api_locking::LockAction::NotApplicable,
))
.await
Expand Down
4 changes: 2 additions & 2 deletions crates/router/src/services/authentication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,11 @@ pub async fn get_admin_api_key(
}

#[derive(Debug)]
pub struct UserJWTAuth;
pub struct UserWithoutMerchantJWTAuth;

#[cfg(feature = "olap")]
#[async_trait]
impl<A> AuthenticateAndFetch<UserWithoutMerchantFromToken, A> for UserJWTAuth
impl<A> AuthenticateAndFetch<UserWithoutMerchantFromToken, A> for UserWithoutMerchantJWTAuth
where
A: AppStateInfo + Sync,
{
Expand Down

0 comments on commit e769dce

Please sign in to comment.