Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
fix threads merge bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Jul 16, 2023
1 parent 6ea7055 commit e4d8b32
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion components/ui/report/ReportView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async function fetchReport() {
let users = []
if (userIds.length > 0) {
const { data: usersVal } = await useAsyncData(`users?ids=${JSON.stringify(userIds)}`, () =>
useBaseFetch(`users?ids=${JSON.stringify(userIds)}`, app.$defaultHeaders())
useBaseFetch(`users?ids=${JSON.stringify(userIds)}`)
)
users = usersVal.value
}
Expand Down
6 changes: 2 additions & 4 deletions components/ui/report/ReportsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ReportInfo
v-for="report in reports.filter(
(x) =>
(moderation || x.reporterUser.id === props.auth.user.id) &&
(moderation || x.reporterUser.id === auth.user.id) &&
(viewMode === 'open' ? x.open : !x.open)
)"
:key="report.id"
Expand Down Expand Up @@ -34,9 +34,7 @@ defineProps({
const viewMode = ref('open')
const reports = ref([])
let { data: rawReports } = await useAsyncData('report', () =>
useBaseFetch('report')
)
let { data: rawReports } = await useAsyncData('report', () => useBaseFetch('report'))
rawReports = rawReports.value.map((report) => {
report.item_id = report.item_id.replace(/"/g, '')
Expand Down
5 changes: 2 additions & 3 deletions pages/moderation/messages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ useHead({
title: 'Moderation inbox - Modrinth',
})
const { data: inbox } = await useAsyncData('thread/inbox', () =>
useBaseFetch('thread/inbox')
)
const auth = await useAuth()
const { data: inbox } = await useAsyncData('thread/inbox', () => useBaseFetch('thread/inbox'))
function getLink(thread) {
if (thread.report_id) {
Expand Down
2 changes: 1 addition & 1 deletion pages/moderation/review.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const TIME_24H = 86400000
const TIME_48H = TIME_24H * 2
const { data: projects } = await useAsyncData('moderation/projects?count=1000', () =>
useBaseFetch('moderation/projects?count=1000', app.$defaultHeaders())
useBaseFetch('moderation/projects?count=1000')
)
const members = ref([])
const projectType = ref('all')
Expand Down

0 comments on commit e4d8b32

Please sign in to comment.