Skip to content

Commit

Permalink
fix: empty payload on bulk validation #229
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab authored and frodrigo committed Aug 21, 2024
1 parent bc84bef commit d899311
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pages/[project]/changes_logs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ function removeLogs(loChaIds?: number[]) {
async function handleAccept(loChaIds?: number[]) {
try {
if (!loChaIds) {
loChaIds = loChasWithFilter.value.map((loCha) => loCha.id)
}
await $fetch(
`${useRuntimeConfig().public.API}/projects/${projectSlug}/changes_logs/accept`,
{
Expand All @@ -130,7 +134,7 @@ async function handleAccept(loChaIds?: number[]) {
)
removeLogs(loChaIds)
if (!loChaIds || !loChasWithFilter.value.length) {
if (!loChasWithFilter.value.length) {
resetFilters()
}
}
Expand Down Expand Up @@ -165,7 +169,7 @@ function matchFilterBySelectors(selectors: string[]) {
</el-row>
<log-filters />
<log-validator-bulk
v-if="isProjectUser && (Object.keys(route.query).length)"
v-if="isProjectUser && Object.keys(route.query).length"
@bulk-validation="handleAccept"
/>
<h3>{{ $t('logs.data') }}</h3>
Expand Down

0 comments on commit d899311

Please sign in to comment.