Skip to content

Commit 93b8e36

Browse files
committed
fix: approve status incorrect (#4104)
1 parent 7170b84 commit 93b8e36

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

apps/frontend/src/components/ui/moderation/checklist/ModerationChecklist.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@
259259
</button>
260260
</ButtonStyled>
261261
<ButtonStyled color="green">
262-
<button @click="sendMessage('approved')">
262+
<button @click="sendMessage(project.requested_status ?? 'approved')">
263263
<CheckIcon aria-hidden="true" />
264264
Approve
265265
</button>
@@ -364,6 +364,7 @@ import {
364364
type ModerationJudgements,
365365
type ModerationModpackItem,
366366
type Project,
367+
type ProjectStatus,
367368
renderHighlightedString,
368369
} from '@modrinth/utils'
369370
import { computedAsync, useLocalStorage } from '@vueuse/core'
@@ -529,7 +530,7 @@ function handleKeybinds(event: KeyboardEvent) {
529530
tryResetProgress: resetProgress,
530531
tryExitModeration: () => emit('exit'),
531532
532-
tryApprove: () => sendMessage('approved'),
533+
tryApprove: () => sendMessage(props.project.requested_status),
533534
tryReject: () => sendMessage('rejected'),
534535
tryWithhold: () => sendMessage('withheld'),
535536
tryEditMessage: goBackToStages,
@@ -1210,7 +1211,7 @@ function generateModpackMessage(allFiles: {
12101211
}
12111212
12121213
const hasNextProject = ref(false)
1213-
async function sendMessage(status: 'approved' | 'rejected' | 'withheld') {
1214+
async function sendMessage(status: ProjectStatus) {
12141215
try {
12151216
await useBaseFetch(`project/${props.project.id}`, {
12161217
method: 'PATCH',

0 commit comments

Comments
 (0)