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

Commit

Permalink
Fix invalid auth error on project submit
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Mar 9, 2024
1 parent 331787f commit a3167a3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pages/[type]/[id]/moderation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const props = defineProps({
const app = useNuxtApp()
const auth = await useAuth()
const tags = useTags()
const { data: thread } = await useAsyncData(`thread/${props.project.thread_id}`, () =>
useBaseFetch(`thread/${props.project.thread_id}`)
Expand All @@ -138,10 +139,14 @@ async function setStatus(status) {
method: 'PATCH',
body: data,
})
await useBaseFetch(`thread/${props.project.thread_id}/read`, {
method: 'POST',
body: data,
})
if (tags.value.staffRoles.includes(auth.value.user.role)) {
await useBaseFetch(`thread/${props.project.thread_id}/read`, {
method: 'POST',
body: data,
})
}
const project = props.project
project.status = status
await props.resetProject()
Expand Down

0 comments on commit a3167a3

Please sign in to comment.