Skip to content

Commit

Permalink
Update SecretsOps to be consistent with VariablesOps
Browse files Browse the repository at this point in the history
  • Loading branch information
phalestrivir committed Oct 24, 2023
1 parent d75741d commit 59d9925
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/ops/cloud/SecretsOps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default (state: State): Secret => {
return readSecrets({ state });
},
async readSecret(secretId: string) {
return _getSecret({ secretId, state });
return readSecret({ secretId, state });
},
async exportSecret(secretId: string): Promise<SecretsExportInterface> {
return exportSecret({ secretId, state });
Expand Down Expand Up @@ -307,7 +307,7 @@ export default (state: State): Secret => {
return _deleteVersionOfSecret({ secretId, version, state });
},

// Deprecatd
// Deprecated

async getSecrets() {
return readSecrets({ state });
Expand Down Expand Up @@ -438,6 +438,16 @@ export async function disableVersionOfSecret({
});
}

export async function readSecret({
secretId,
state,
}: {
secretId: string;
state: State;
}): Promise<SecretSkeleton> {
return await _getSecret({ secretId, state });
}

export async function readSecrets({
state,
}: {
Expand All @@ -451,8 +461,6 @@ export {
_putSecret as createSecret,
_createNewVersionOfSecret as createVersionOfSecret,
_deleteSecret as deleteSecret,
_deleteVersionOfSecret as deleteVersionOfSecret,
_getSecret as readSecret,
_getVersionOfSecret as readVersionOfSecret,
_getSecretVersions as readVersionsOfSecret,
_setSecretDescription as updateSecretDescription,
Expand Down

0 comments on commit 59d9925

Please sign in to comment.