Skip to content

Commit

Permalink
update-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Mar 11, 2024
1 parent 1e36939 commit 3af09bd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ const args = yargs(Deno.args)
yargs
.option("get", {
alias: "g",
description: "Get a value for a given key: `<secret> <input json>`",
description:
"Get a value for a given key: `<token> <cacheId> <jsonString>`",
string: true,
})
.option("delete", {
alias: "d",
description: "Deletes a value for a given key: `<secret> <input json>`",
description:
"Deletes a value for a given key: `<token> <cacheId> <jsonString>`",
string: true,
}))
.command(
Expand Down
4 changes: 2 additions & 2 deletions cli/src/keyManipulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { callServer } from "./rpc.ts";
import { inputToCacheKey } from "../../client/src/index.ts";

const actOnKey = (method: string) => (args: string) => () => {
const [token, cacheId, key] = args.split(" ");
const [token, cacheId, jsonString] = args.split(" ");
return callServer("", "POST", {
method,
params: {
cacheId,
key: inputToCacheKey(token, undefined)(...JSON.parse(key)),
key: inputToCacheKey(token, undefined)(...JSON.parse(jsonString)),
},
})(token);
};
Expand Down
9 changes: 9 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3af09bd

Please sign in to comment.