diff --git a/src/commands/api-key/list.ts b/src/commands/api-key/list.ts index cecbcdfa..4087e3d9 100644 --- a/src/commands/api-key/list.ts +++ b/src/commands/api-key/list.ts @@ -51,7 +51,7 @@ export default class APIKeyListCmd extends Command { await getApplication(getBalenaSdk(), options.fleet, { $select: 'actor', }) - ).actor + ).actor.__id : await getBalenaSdk().auth.getActorId(); const keys = await getBalenaSdk().pine.get({ resource: 'api_key', diff --git a/tests/nock/balena-api-mock.ts b/tests/nock/balena-api-mock.ts index add690e9..89cd0150 100644 --- a/tests/nock/balena-api-mock.ts +++ b/tests/nock/balena-api-mock.ts @@ -416,11 +416,11 @@ export class BalenaAPIMock extends NockMock { * Mocks balena-release call */ public expectGetUser(opts: ScopeOpts = {}) { - this.optGet(/^\/v6\/user/, opts).reply(200, { + this.optGet(/^\/v7\/user/, opts).reply(200, { d: [ { id: 99999, - actor: 1234567, + actor: { __id: 1234567 }, username: 'gh_user', created_at: '2018-08-19T13:55:04.485Z', __metadata: { diff --git a/tests/test-data/api-response/application-GET-v6-expanded-app-type-cpu-arch.json b/tests/test-data/api-response/application-GET-v6-expanded-app-type-cpu-arch.json index 62fe7329..0cee0659 100644 --- a/tests/test-data/api-response/application-GET-v6-expanded-app-type-cpu-arch.json +++ b/tests/test-data/api-response/application-GET-v6-expanded-app-type-cpu-arch.json @@ -23,7 +23,7 @@ } ], "depends_on__application": null, - "actor": 3423895, + "actor": { "__id": 3423895 }, "app_name": "testApp", "slug": "gh_user/testApp", "should_be__running_release": [ diff --git a/tests/test-data/api-response/application-GET-v6-expanded-app-type.json b/tests/test-data/api-response/application-GET-v6-expanded-app-type.json index 6708b2f1..9f6d194f 100644 --- a/tests/test-data/api-response/application-GET-v6-expanded-app-type.json +++ b/tests/test-data/api-response/application-GET-v6-expanded-app-type.json @@ -23,7 +23,7 @@ } ], "depends_on__application": null, - "actor": 3423895, + "actor": { "__id": 3423895 }, "app_name": "testApp", "slug": "gh_user/testApp", "should_be__running_release": [