@@ -21,7 +21,7 @@ export function TeamUsers (http, data) {
2121 * import * as contentstack from '@contentstack/management'
2222 * const client = contentstack.client()
2323 *
24- * client.organization('organizationUid').teams('teamUid').users ('userId').remove()
24+ * client.organization('organizationUid').teams('teamUid').teamUsers ('userId').remove()
2525 * .then((response) => console.log(response))
2626 *
2727 */
@@ -40,7 +40,7 @@ export function TeamUsers (http, data) {
4040 * const usersMail = {
4141 * emails: ['emailId1','emailId2' ]
4242 * }
43- * client.organization('organizationUid').teams('teamUid').users ('userId').add(usersMail)
43+ * client.organization('organizationUid').teams('teamUid').teamUsers ('userId').add(usersMail)
4444 * .then((response) => console.log(response))
4545 *
4646 */
@@ -56,15 +56,15 @@ export function TeamUsers (http, data) {
5656 * const client = contentstack.client()
5757 * const usersMail = {
5858 * emails: ['emailId1','emailId2' ]}
59- * client.organization('organizationUid').teams('teamUid').users ('userId').query().find()
59+ * client.organization('organizationUid').teams('teamUid').teamUsers ('userId').query().find()
6060 * .then((response) => console.log(response))
6161 *
6262 */
6363 this . fetchAll = fetchAll ( http , UsersCollection )
6464 }
6565}
6666export function UsersCollection ( http , data ) {
67- const obj = cloneDeep ( data . users ) || [ ]
67+ const obj = cloneDeep ( data . teamUsers ) || [ ]
6868 const usersCollection = obj . map ( ( user ) => {
6969 return new TeamUsers ( http , { userId : user } )
7070 } )
0 commit comments