Skip to content
Open
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
16 changes: 8 additions & 8 deletions src/services/groupfoldersService.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function enableAcl(folderId) {
}

if (resp.status === 500) {
throw new Error('Groupfolders\' API doesn\'t enable ACL. May be a problem with the connection ?')
throw new Error('Groupfolders\' API doesn\'t enable ACL. May be a problem with the connection?')
}
})
.catch(error => {
Expand All @@ -153,10 +153,10 @@ export function addGroupToGroupfolder(folderId, gid) {
})
.catch(error => {
showNotificationError(
t('workspace', 'Group error'),
t('workspace', 'Impossible to attach the {gid} group to groupfolder. May be a problem with the connection ?', { gid }),
t('workspace', 'Error groups'),
t('workspace', 'Impossible to attach the {gid} group to groupfolder. May be a problem with the connection?', { gid }),
5000)
console.error(`Impossible to attach the ${gid} group to groupfolder. May be a problem with the connection ?`, error)
console.error(`Impossible to attach the ${gid} group to groupfolder. May be a problem with the connection?`, error)
throw new AddGroupToGroupfolderError('Error to add Space Manager group in the groupfolder')
})
}
Expand All @@ -179,8 +179,8 @@ export function removeGroupToManageACLForGroupfolder(folderId, gid) {
})
.catch(error => {
showNotificationError(
t('workspace', 'Error to remove group as manager acl'),
t('workspace', 'Impossible to remove the group from the advanced permissions.'),
t('workspace', 'Error while removing group as manager ACL'),
t('workspace', 'Impossible to remove group from the advanced permissions.'),
5000)
console.error('Impossible to remove the group from the advanced permissions.', error)
throw new RemoveGroupToManageACLForGroupfolderError('Impossible to remove the group from the advanced permissions.')
Expand All @@ -201,7 +201,7 @@ export function createGroupfolder(spaceName) {
})
.then(resp => {
if (resp.data.ocs.meta.statuscode !== 100) {
throw new Error('Impossible to create a groupfolder. May be an error network ?')
throw new Error('Impossible to create a groupfolder. May be an error network?')
}
return resp.data.ocs
})
Expand Down Expand Up @@ -236,7 +236,7 @@ export function destroy(workspace) {
}
})
.catch(error => {
console.error('Error to delete a groupfolder. May be a problem network ?', error)
console.error('Error to delete a groupfolder. May be a problem network?', error)
})
}
return resp.data
Expand Down
8 changes: 4 additions & 4 deletions src/services/spaceService.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ export function addGroupToWorkspace(spaceId, gid) {
})
.catch(error => {
showNotificationError(
t('workspace', 'Group error'),
t('workspace', 'Impossible to attach the {gid} group to workspace. May be a problem with the connection ?', { gid }),
t('workspace', 'Error groups'),
t('workspace', 'Impossible to attach the {gid} group to workspace. May be a problem with the connection?', { gid }),
5000)
console.error('Impossible to attach the group to workspace. May be a problem with the connection ?', gid, error)
console.error('Impossible to attach the group to workspace. May be a problem with the connection?', gid, error)
throw new AddGroupToGroupfolderError('Error to add Space Manager group in the groupfolder')
})
}
Expand All @@ -166,7 +166,7 @@ export function removeWorkspace(spaceId) {
return resp.data
})
.catch(error => {
console.error('Error to delete a workspace. May be a problem network ?', error)
console.error('Error to delete a workspace. May be a problem network?', error)
})
return result
}
Expand Down
2 changes: 1 addition & 1 deletion src/tests/unit/groupfoldersService.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ describe('enableAcl function', () => {
it('throws error if resp.status is not 200', async () => {
axios.post.mockResolvedValue({ status: 500, ...responseValue })
const promise = enableAcl()
await expect(promise).rejects.toThrow('Groupfolders\' API doesn\'t enable ACL. May be a problem with the connection ?')
await expect(promise).rejects.toThrow('Groupfolders\' API doesn\'t enable ACL. May be a problem with the connection?')
})
})

Expand Down
Loading