Skip to content

Commit

Permalink
Merge pull request #6494 from TheThingsNetwork/issue/6314-console-del…
Browse files Browse the repository at this point in the history
…ete-apikey

Update handleDelete of APIKeys in Console
  • Loading branch information
nicholaspcr authored Sep 3, 2023
2 parents e4048d9 + dfbb31a commit 57b02bf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sdk/js/src/service/api-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ class ApiKeys {
}

async deleteById(entityId, id) {
return this.updateById(entityId, id, {
rights: [],
const entityIdRoute = this._parentRoutes.delete
const result = await this._api.DeleteAPIKey({
routeParams: { [entityIdRoute]: entityId, key_id: id },
})

return Marshaler.payloadSingleResponse(result)
}

async updateById(
Expand Down
1 change: 1 addition & 0 deletions sdk/js/src/service/applications.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Applications {
list: 'application_ids.application_id',
create: 'application_ids.application_id',
update: 'application_ids.application_id',
delete: 'application_ids.application_id',
},
})
this.Link = new Link(api.As)
Expand Down
1 change: 1 addition & 0 deletions sdk/js/src/service/gateways.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Gateways {
list: 'gateway_ids.gateway_id',
create: 'gateway_ids.gateway_id',
update: 'gateway_ids.gateway_id',
delete: 'gateway_ids.gateway_id',
},
})
this.Collaborators = new Collaborators(api.GatewayAccess, {
Expand Down
1 change: 1 addition & 0 deletions sdk/js/src/service/organizations.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Organizations {
list: 'organization_ids.organization_id',
create: 'organization_ids.organization_id',
update: 'organization_ids.organization_id',
delete: 'organization_ids.organization_id',
},
})
this.Collaborators = new Collaborators(api.OrganizationAccess, {
Expand Down
1 change: 1 addition & 0 deletions sdk/js/src/service/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Users {
list: 'user_ids.user_id',
create: 'user_ids.user_id',
update: 'user_ids.user_id',
delete: 'user_ids.user_id',
},
})

Expand Down

0 comments on commit 57b02bf

Please sign in to comment.