[fix] Ignore button is broken

This commit is contained in:
ljf (zamentur) 2021-06-02 03:41:42 +02:00 committed by GitHub
parent 03776af0b9
commit 2fb370982b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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