Skip to content

Commit

Permalink
Merge pull request #152 from Scalingo/feat/collaboration/missing-fields
Browse files Browse the repository at this point in the history
[Collaborator] Add missing fields user_id/app_id to Collaborator model, update semantic of transfer to mention the ID should be given
  • Loading branch information
ksol authored Nov 4, 2021
2 parents 4eb337c + 21f27bd commit 8b19ce2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Apps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,16 @@ export default class Apps {
* @see https://developers.scalingo.com/apps.html#transfer-ownership-of-an-application
* @param appID ID of the application
* @param currentName Current name of the application. Used as validation.
* @param ownerEmail Email address of the new owner.
* @param ownerID Email address of the new owner.
* @return Promise that when resolved returns the App transferred.
*/
transfer(
appID: string,
currentName: string,
ownerEmail: string
): Promise<App> {
transfer(appID: string, currentName: string, ownerID: string): Promise<App> {
return unpackData(
this._client.apiClient().patch(
`/apps/${appID}`,
{
app: {
owner: ownerEmail,
owner: ownerID,
},
},
{ params: { current_name: currentName } }
Expand Down
4 changes: 4 additions & 0 deletions src/models/regional/collaborators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export interface Collaborator {
id: string;
/** Email of the collaborator to invite */
email: string;
/** Unique User ID of the user who accepted the collaboration */
user_id: string;
/** ID of the application owning the collaborator */
app_id: string;
/** Username of the person to invite */
username: string;
/** Status of the invitation */
Expand Down

0 comments on commit 8b19ce2

Please sign in to comment.