Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Collaborator] Add missing fields user_id/app_id to Collaborator model, update semantic of transfer to mention the ID should be given #152

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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