Skip to content

Commit

Permalink
refactor: update types and test helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
k80bowman committed Mar 11, 2024
1 parent 4ccb2e7 commit 68406b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/commands/apps/join.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export default class AppsJoin extends Command {
};

public async run(): Promise<void> {
const {flags, argv, args} = await this.parse(AppsJoin)
const {flags} = await this.parse(AppsJoin)
const {app} = flags
ux.action.start(`Joining ${color.cyan(app)}`)
const {body: user} = await this.heroku.get<Heroku.Account>('/account')
await this.heroku.post<Heroku.TeamAppCollaborator[]>(`/teams/apps/${app}/collaborators`, {
await this.heroku.post<Heroku.TeamAppCollaborator>(`/teams/apps/${app}/collaborators`, {
body: {user: user.email},
})
ux.action.stop()
Expand Down
4 changes: 2 additions & 2 deletions packages/orgs-v5/test/unit/stub/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function collaborators() {
}).reply(200)
}

function teamAppCollaborators(email = 'raulb@heroku.com', permissions = [], response = {}) {
function teamAppCollaborators(email = 'raulb@heroku.com', permissions = []) {
let body = {user: email}
if (permissions.length > 0) {
body.permissions = permissions
Expand All @@ -18,7 +18,7 @@ function teamAppCollaborators(email = 'raulb@heroku.com', permissions = [], resp
return nock('https://api.heroku.com:443', {
reqheaders: {Accept: 'application/vnd.heroku+json; version=3'},
})
.post('/teams/apps/myapp/collaborators', body).reply(response.code || 200, response.description)
.post('/teams/apps/myapp/collaborators', body).reply(200)
}

function personalToPersonal() {
Expand Down

0 comments on commit 68406b8

Please sign in to comment.