[fix] key value aggregation in diagnosis

This commit is contained in:
ljf 2021-06-03 18:17:50 +02:00
parent 955c774602
commit 37e58f5fe7

View file

@ -183,14 +183,11 @@ export default {
},
toggleIgnoreIssue (action, report, item) {
const filterArgs = [report.id].concat(Object.entries(item.meta).reduce((filterArgs, entries) => {
filterArgs.push(entries.join('='))
return filterArgs
}))
const filterArgs = [report.id].concat(Object.entries(item.meta).map(entries => entries.join('=')))
api.put(
'diagnosis/' + action,
{ 'filter[]': filterArgs },
{ filter: filterArgs },
`diagnosis.${action}.${item.status.toLowerCase()}`
).then(() => {
item.ignored = action === 'ignore'