mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
chore(merchant_account): remove api_key field (#713)
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
use common_utils::pii;
|
||||
use diesel::{AsChangeset, Identifiable, Insertable, Queryable};
|
||||
use masking::StrongSecret;
|
||||
|
||||
use crate::{enums as storage_enums, schema::merchant_account};
|
||||
|
||||
@ -19,7 +18,6 @@ use crate::{enums as storage_enums, schema::merchant_account};
|
||||
pub struct MerchantAccount {
|
||||
pub id: i32,
|
||||
pub merchant_id: String,
|
||||
pub api_key: Option<StrongSecret<String>>,
|
||||
pub return_url: Option<String>,
|
||||
pub enable_payment_response_hash: bool,
|
||||
pub payment_response_hash_key: Option<String>,
|
||||
@ -41,7 +39,6 @@ pub struct MerchantAccount {
|
||||
pub struct MerchantAccountNew {
|
||||
pub merchant_id: String,
|
||||
pub merchant_name: Option<String>,
|
||||
pub api_key: Option<StrongSecret<String>>,
|
||||
pub merchant_details: Option<serde_json::Value>,
|
||||
pub return_url: Option<String>,
|
||||
pub webhook_details: Option<serde_json::Value>,
|
||||
@ -60,7 +57,6 @@ pub struct MerchantAccountNew {
|
||||
pub enum MerchantAccountUpdate {
|
||||
Update {
|
||||
merchant_name: Option<String>,
|
||||
api_key: Option<StrongSecret<String>>,
|
||||
merchant_details: Option<serde_json::Value>,
|
||||
return_url: Option<String>,
|
||||
webhook_details: Option<serde_json::Value>,
|
||||
@ -83,7 +79,6 @@ pub enum MerchantAccountUpdate {
|
||||
#[diesel(table_name = merchant_account)]
|
||||
pub struct MerchantAccountUpdateInternal {
|
||||
merchant_name: Option<String>,
|
||||
api_key: Option<StrongSecret<String>>,
|
||||
merchant_details: Option<serde_json::Value>,
|
||||
return_url: Option<String>,
|
||||
webhook_details: Option<serde_json::Value>,
|
||||
@ -104,7 +99,6 @@ impl From<MerchantAccountUpdate> for MerchantAccountUpdateInternal {
|
||||
match merchant_account_update {
|
||||
MerchantAccountUpdate::Update {
|
||||
merchant_name,
|
||||
api_key,
|
||||
merchant_details,
|
||||
return_url,
|
||||
webhook_details,
|
||||
@ -119,7 +113,6 @@ impl From<MerchantAccountUpdate> for MerchantAccountUpdateInternal {
|
||||
metadata,
|
||||
} => Self {
|
||||
merchant_name,
|
||||
api_key,
|
||||
merchant_details,
|
||||
return_url,
|
||||
webhook_details,
|
||||
|
||||
@ -81,15 +81,6 @@ impl MerchantAccount {
|
||||
.await
|
||||
}
|
||||
|
||||
#[instrument(skip(conn))]
|
||||
pub async fn find_by_api_key(conn: &PgPooledConn, api_key: &str) -> StorageResult<Self> {
|
||||
generics::generic_find_one::<<Self as HasTable>::Table, _, _>(
|
||||
conn,
|
||||
dsl::api_key.eq(api_key.to_owned()),
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn find_by_publishable_key(
|
||||
conn: &PgPooledConn,
|
||||
|
||||
@ -162,7 +162,6 @@ diesel::table! {
|
||||
merchant_account (id) {
|
||||
id -> Int4,
|
||||
merchant_id -> Varchar,
|
||||
api_key -> Nullable<Varchar>,
|
||||
return_url -> Nullable<Varchar>,
|
||||
enable_payment_response_hash -> Bool,
|
||||
payment_response_hash_key -> Nullable<Varchar>,
|
||||
|
||||
Reference in New Issue
Block a user