Skip to content

Commit

Permalink
docs(secrets): Add missing awaits to README; update example title
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Aug 7, 2023
1 parent e342985 commit 8a79890
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ const password = await keyring.getPassword("ServiceName", "AccountName");

```js
const { keyring } = require("@zowe/secrets-for-zowe-sdk");
const password = keyring.findPassword("ServiceName", "AccountName");
const password = await keyring.findPassword("ServiceName", "AccountName");
// password should equal "SomePassword"
```

### Finding all credentials matching attribute
### Finding all credentials matching service

```js
const { keyring } = require("@zowe/secrets-for-zowe-sdk");
const matchingCredentials = keyring.findCredentials("ServiceName");
const matchingCredentials = await keyring.findCredentials("ServiceName");
// returns:
// [
// { account: "AccountName", password: "SomePassword" },
Expand All @@ -42,6 +42,6 @@ const matchingCredentials = keyring.findCredentials("ServiceName");

```js
const { keyring } = require("@zowe/secrets-for-zowe-sdk");
const wasDeleted = keyring.deletePassword("ServiceName", "AccountName");
const wasDeleted = await keyring.deletePassword("ServiceName", "AccountName");
// wasDeleted should be true; ServiceName/AccountName removed from credential vault
```

0 comments on commit 8a79890

Please sign in to comment.