Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 471e514

Browse files
authored
Merge pull request #7 from newsela/master
Fix typo in API url
2 parents a701452 + a91450b commit 471e514

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/commands/create-apikey.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ export default class CreateApikey extends BaseCommand {
4141
this.error('Cannot find the backend that you are trying to create an API key for. Please run `slash-graphql list-backends` to get a list of backends')
4242
}
4343

44-
const response = await fetch(`${apiServer}/deployment/${id}/api-keys`, {
44+
const response = await fetch(`${apiServer}/deployments/${id}/api-keys`, {
4545
method: 'POST',
4646
headers: {
47-
Authorization: `Bearer ${token}`,
47+
'Content-Type': 'application/json',
48+
Authorization: `Bearer ${token}`
4849
},
4950
body: JSON.stringify({
50-
name: opts.args.name,
51-
role: opts.args.role
51+
name: opts.flags.name,
52+
role: opts.flags.role
5253
})
5354
})
5455
if (response.status !== 200) {

0 commit comments

Comments
 (0)