refactor(api_keys): use merchant_id and key_id to query the table (#939)

Signed-off-by: Chethan <chethan.rao@juspay.in>
This commit is contained in:
Chethan Rao
2023-04-25 01:04:18 +05:30
committed by GitHub
parent ab7fc23a7b
commit 40898c0ac9
7 changed files with 99 additions and 40 deletions

View File

@ -134,10 +134,13 @@ pub struct UpdateApiKeyRequest {
/// The response body for revoking an API Key.
#[derive(Debug, Serialize, ToSchema)]
pub struct RevokeApiKeyResponse {
/// The identifier for the Merchant Account.
#[schema(max_length = 64, example = "y3oqhf46pyzuxjbcn2giaqnb44")]
pub merchant_id: String,
/// The identifier for the API Key.
#[schema(max_length = 64, example = "5hEEqkgJUyuxgSKGArHA4mWSnX")]
pub key_id: String,
/// Indicates whether the API key was revoked or not.
#[schema(example = "true")]
pub revoked: bool,