Skip to content

Commit

Permalink
Added changes to get list of folder users and remove users from share…
Browse files Browse the repository at this point in the history
…d folders
  • Loading branch information
Ramon Candel authored and Ramon Candel committed Aug 16, 2023
1 parent c6fd9b8 commit 9593cb9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/drive/share/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class Share {
const orderByQueryParam = orderBy ? `&orderBy=${orderBy}` : '';

return this.client.get(
`private-sharing/shared-with/by-folder-id/${folderUUID}?page=${page}&perPage=${perPage}${orderByQueryParam}`,
`private-sharing/shared-with/${folderUUID}?page=${page}&perPage=${perPage}${orderByQueryParam}`,
this.headers(),
);
}
Expand Down Expand Up @@ -356,7 +356,7 @@ export class Share {
* @param {string} folderUUID - The unique identifier of the folder.
* @returns {Promise<{ stopped: boolean }>} A promise that resolves with an object indicating whether the sharing was stopped.
*/
public stopSharingFolder(folderUUID: string): Promise<{ stoped: boolean }> {
public stopSharingFolder(folderUUID: string): Promise<{ message: string }> {
return this.client.delete(`/private-sharing/stop/folder-id/${folderUUID}`, this.headers());
}

Expand All @@ -366,8 +366,11 @@ export class Share {
* @param {string} userUUID - The UUID of the user to be removed.
* @returns {Promise<{ removed: boolean }>} A promise indicating whether the user was removed.
*/
public removeUserFromSharedFolder(folderUUID: string, userUUID: string): Promise<{ removed: boolean }> {
return this.client.delete(`/private-sharing/remove/folder-id/${folderUUID}/user-id/${userUUID}`, this.headers());
public removeUserFromSharedFolder(folderUUID: string, userUUID: string): Promise<{ message: string }> {
return this.client.delete(
`/private-sharing/shared-with/folder-id/${folderUUID}/user-id/${userUUID}`,
this.headers(),
);
}

/**
Expand Down

0 comments on commit 9593cb9

Please sign in to comment.