mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-08 08:09:05 +08:00
chore(router): removed jwt auth from routes (#448)
Co-authored-by: Sampras Lopes <lsampras@protonmail.com>
This commit is contained in:
@ -31,7 +31,7 @@ pub async fn merchant_account_create(
|
||||
&req,
|
||||
json_payload.into_inner(),
|
||||
|state, _, req| create_merchant_account(&*state.store, req),
|
||||
*auth::jwt_auth_or(&auth::AdminApiAuth, req.headers()),
|
||||
&auth::AdminApiAuth,
|
||||
)
|
||||
.await
|
||||
}
|
||||
@ -62,7 +62,7 @@ pub async fn retrieve_merchant_account(
|
||||
&req,
|
||||
payload,
|
||||
|state, _, req| get_merchant_account(&*state.store, req),
|
||||
*auth::jwt_auth_or(&auth::AdminApiAuth, req.headers()),
|
||||
&auth::AdminApiAuth,
|
||||
)
|
||||
.await
|
||||
}
|
||||
@ -92,7 +92,7 @@ pub async fn update_merchant_account(
|
||||
&req,
|
||||
json_payload.into_inner(),
|
||||
|state, _, req| merchant_account_update(&*state.store, &merchant_id, req),
|
||||
*auth::jwt_auth_or(&auth::AdminApiAuth, req.headers()),
|
||||
&auth::AdminApiAuth,
|
||||
)
|
||||
.await
|
||||
}
|
||||
@ -124,7 +124,7 @@ pub async fn delete_merchant_account(
|
||||
&req,
|
||||
payload,
|
||||
|state, _, req| merchant_account_delete(&*state.store, req.merchant_id),
|
||||
*auth::jwt_auth_or(&auth::AdminApiAuth, req.headers()),
|
||||
&auth::AdminApiAuth,
|
||||
)
|
||||
.await
|
||||
}
|
||||
@ -154,7 +154,7 @@ pub async fn payment_connector_create(
|
||||
&req,
|
||||
json_payload.into_inner(),
|
||||
|state, _, req| create_payment_connector(&*state.store, req, &merchant_id),
|
||||
*auth::jwt_auth_or(&auth::AdminApiAuth, req.headers()),
|
||||
&auth::AdminApiAuth,
|
||||
)
|
||||
.await
|
||||
}
|
||||
@ -194,7 +194,7 @@ pub async fn payment_connector_retrieve(
|
||||
|state, _, req| {
|
||||
retrieve_payment_connector(&*state.store, req.merchant_id, req.merchant_connector_id)
|
||||
},
|
||||
*auth::jwt_auth_or(&auth::AdminApiAuth, req.headers()),
|
||||
&auth::AdminApiAuth,
|
||||
)
|
||||
.await
|
||||
}
|
||||
@ -226,7 +226,7 @@ pub async fn payment_connector_list(
|
||||
&req,
|
||||
merchant_id,
|
||||
|state, _, merchant_id| list_payment_connectors(&*state.store, merchant_id),
|
||||
*auth::jwt_auth_or(&auth::AdminApiAuth, req.headers()),
|
||||
&auth::AdminApiAuth,
|
||||
)
|
||||
.await
|
||||
}
|
||||
@ -263,7 +263,7 @@ pub async fn payment_connector_update(
|
||||
|state, _, req| {
|
||||
update_payment_connector(&*state.store, &merchant_id, merchant_connector_id, req)
|
||||
},
|
||||
*auth::jwt_auth_or(&auth::AdminApiAuth, req.headers()),
|
||||
&auth::AdminApiAuth,
|
||||
)
|
||||
.await
|
||||
}
|
||||
@ -302,7 +302,7 @@ pub async fn payment_connector_delete(
|
||||
|state, _, req| {
|
||||
delete_payment_connector(&*state.store, req.merchant_id, req.merchant_connector_id)
|
||||
},
|
||||
*auth::jwt_auth_or(&auth::AdminApiAuth, req.headers()),
|
||||
&auth::AdminApiAuth,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user