You've already forked AstralRinth
forked from didirus/AstralRinth
Fix invalid auth error on project submit (#1655)
This commit is contained in:
@@ -124,6 +124,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const app = useNuxtApp()
|
const app = useNuxtApp()
|
||||||
const auth = await useAuth()
|
const auth = await useAuth()
|
||||||
|
const tags = useTags()
|
||||||
|
|
||||||
const { data: thread } = await useAsyncData(`thread/${props.project.thread_id}`, () =>
|
const { data: thread } = await useAsyncData(`thread/${props.project.thread_id}`, () =>
|
||||||
useBaseFetch(`thread/${props.project.thread_id}`)
|
useBaseFetch(`thread/${props.project.thread_id}`)
|
||||||
@@ -138,10 +139,14 @@ async function setStatus(status) {
|
|||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
body: data,
|
body: data,
|
||||||
})
|
})
|
||||||
await useBaseFetch(`thread/${props.project.thread_id}/read`, {
|
|
||||||
method: 'POST',
|
if (tags.value.staffRoles.includes(auth.value.user.role)) {
|
||||||
body: data,
|
await useBaseFetch(`thread/${props.project.thread_id}/read`, {
|
||||||
})
|
method: 'POST',
|
||||||
|
body: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const project = props.project
|
const project = props.project
|
||||||
project.status = status
|
project.status = status
|
||||||
await props.resetProject()
|
await props.resetProject()
|
||||||
|
|||||||
Reference in New Issue
Block a user