diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rs index a2a26a992b05..55f86885412e 100644 --- a/crates/router/src/routes/app.rs +++ b/crates/router/src/routes/app.rs @@ -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)) diff --git a/crates/router/src/routes/user_role.rs b/crates/router/src/routes/user_role.rs index 7f07875a9e19..2b9fd77df018 100644 --- a/crates/router/src/routes/user_role.rs +++ b/crates/router/src/routes/user_role.rs @@ -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 diff --git a/crates/router/src/services/authentication.rs b/crates/router/src/services/authentication.rs index 4f8722618409..eaadc0d5c7be 100644 --- a/crates/router/src/services/authentication.rs +++ b/crates/router/src/services/authentication.rs @@ -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 AuthenticateAndFetch for UserJWTAuth +impl AuthenticateAndFetch for UserWithoutMerchantJWTAuth where A: AppStateInfo + Sync, {