Skip to content

Commit 8b19ce2

Browse files
authored
Merge pull request #152 from Scalingo/feat/collaboration/missing-fields
[Collaborator] Add missing fields user_id/app_id to Collaborator model, update semantic of transfer to mention the ID should be given
2 parents 4eb337c + 21f27bd commit 8b19ce2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Apps/index.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,16 @@ export default class Apps {
130130
* @see https://developers.scalingo.com/apps.html#transfer-ownership-of-an-application
131131
* @param appID ID of the application
132132
* @param currentName Current name of the application. Used as validation.
133-
* @param ownerEmail Email address of the new owner.
133+
* @param ownerID Email address of the new owner.
134134
* @return Promise that when resolved returns the App transferred.
135135
*/
136-
transfer(
137-
appID: string,
138-
currentName: string,
139-
ownerEmail: string
140-
): Promise<App> {
136+
transfer(appID: string, currentName: string, ownerID: string): Promise<App> {
141137
return unpackData(
142138
this._client.apiClient().patch(
143139
`/apps/${appID}`,
144140
{
145141
app: {
146-
owner: ownerEmail,
142+
owner: ownerID,
147143
},
148144
},
149145
{ params: { current_name: currentName } }

src/models/regional/collaborators.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export interface Collaborator {
1313
id: string;
1414
/** Email of the collaborator to invite */
1515
email: string;
16+
/** Unique User ID of the user who accepted the collaboration */
17+
user_id: string;
18+
/** ID of the application owning the collaborator */
19+
app_id: string;
1620
/** Username of the person to invite */
1721
username: string;
1822
/** Status of the invitation */

0 commit comments

Comments
 (0)