Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Dec 24, 2023
1 parent dbd3993 commit be8a51d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/src/apiToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ const list = callServer("api-token/", "GET", undefined);
const create = callServer("api-token/", "POST", { action: "create" });

export const apiTokenCommands = {
create,
list,
create: () => create,
list: () => list,
delete: (tokenId: string) =>
callServer("api-token/", "POST", { action: "delete", tokenId }),
get: (secret: string) =>
get: () => (secret: string) =>
list(secret).then((tokens: string[]) => tokens[0] || create(secret)),
};

0 comments on commit be8a51d

Please sign in to comment.