chore: simplify team search
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2021-11-13 20:56:20 +01:00
parent 2e345c7931
commit 304cd486ba
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 10 deletions

View File

@ -346,16 +346,12 @@ export default {
const {assignees} = this.parsedQuery
this.teamSearchTimeout = setTimeout(async () => {
const foundTeams = await Promise.all(assignees.map(t => {
return this.teamService.getAll({}, {s: t})
.then(r => {
return r.map(t => {
t.title = t.name
return t
})
})
}))
this.foundTeams = foundTeams.flat()
const teamSearchPromises = assignees.map((t) => this.teamService.getAll({}, {s: t}))
const teamsResult = await Promise.all(teamSearchPromises)
this.foundTeams = teamsResult.flatMap(team => {
team.title = team.name
return team
})
}, 150)
},
closeQuickActions() {