Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
change admin flag
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonpecora committed Oct 20, 2020
1 parent 3aefc7a commit a027846
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/create-apikey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class CreateApikey extends BaseCommand {
static flags = {
...BaseCommand.commonFlags,
name: flags.string({char: 'n', description: 'Client name', default: 'slash-graphql-cli'}),
isAdmin: flags.boolean({char: 'a', description: 'Grant admin role', default: false})
admin: flags.boolean({char: 'a', description: 'Grant admin role', default: false})
}

static args = [{name: 'id', description: 'Backend id', required: true}]
Expand Down Expand Up @@ -47,7 +47,7 @@ export default class CreateApikey extends BaseCommand {
},
body: JSON.stringify({
name: opts.args.name,
role: opts.args.isAdmin ? 'admin' : 'client'
role: opts.args.admin ? 'admin' : 'client'
})
})
if (response.status !== 200) {
Expand Down

0 comments on commit a027846

Please sign in to comment.