Fix notification fetching

environments/review-front-deve-otr6gc/deployments/13419
wvffle 2022-07-21 18:19:21 +00:00 zatwierdzone przez Georg Krause
rodzic 3dff9c74d9
commit aa2d83ac2c
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -94,11 +94,11 @@ const moderationNotifications = computed(() =>
store.state.ui.notifications.pendingReviewRequests
)
Promise.resolve().then(async () => {
onMounted(async () => {
const [edits, reports, requests] = await Promise.all([
axios.get('mutations/', { params: { page_size: 1 } }),
axios.get('manage/moderation/reports/', { params: { page_size: 1 } }),
axios.get('manage/moderation/requests/', { params: { page_size: 1 } })
axios.get('mutations/', { params: { page_size: 1 } }).catch(() => ({ data: { count: 0 } })),
axios.get('manage/moderation/reports/', { params: { page_size: 1 } }).catch(() => ({ data: { count: 0 } })),
axios.get('manage/moderation/requests/', { params: { page_size: 1 } }).catch(() => ({ data: { count: 0 } }))
])
store.commit('ui/incrementNotifications', {