Merge pull request #367 from YunoHost/fix-ignore-button

[fix] Ignore button is broken
This commit is contained in:
Alexandre Aubin 2021-06-02 20:13:59 +02:00 committed by GitHub
commit e64183e2d9
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'