Show group display name in workflows

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-09-16 15:34:10 +02:00
parent f7c59ffdb5
commit f9b4084f52
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
3 changed files with 8 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -84,14 +84,13 @@ export default {
}
this.status.isLoading = true
return axios.get(generateOcsUrl('cloud', 2) + 'groups?limit=20&search=' + encodeURI(searchQuery)).then((response) => {
response.data.ocs.data.groups.reduce((obj, item) => {
obj.push({
id: item,
displayname: item,
return axios.get(generateOcsUrl('cloud', 2) + 'groups/details?limit=20&search=' + encodeURI(searchQuery)).then((response) => {
response.data.ocs.data.groups.forEach((group) => {
this.addGroup({
id: group.id,
displayname: group.displayname,
})
return obj
}, []).forEach((group) => this.addGroup(group))
})
this.status.isLoading = false
}, (error) => {
console.error('Error while loading group list', error.response)