Skip to content

Commit 82d8683

Browse files
authored
fix: approve status incorrect (#4104)
1 parent 3a20e15 commit 82d8683

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>
@@ -355,6 +355,7 @@ import {
355355
renderHighlightedString,
356356
type ModerationJudgements,
357357
type ModerationModpackItem,
358+
type ProjectStatus,
358359
} from "@modrinth/utils";
359360
import { computedAsync, useLocalStorage } from "@vueuse/core";
360361
import {
@@ -527,7 +528,7 @@ function handleKeybinds(event: KeyboardEvent) {
527528
tryResetProgress: resetProgress,
528529
tryExitModeration: () => emit("exit"),
529530
530-
tryApprove: () => sendMessage("approved"),
531+
tryApprove: () => sendMessage(props.project.requested_status),
531532
tryReject: () => sendMessage("rejected"),
532533
tryWithhold: () => sendMessage("withheld"),
533534
tryEditMessage: goBackToStages,
@@ -1208,7 +1209,7 @@ function generateModpackMessage(allFiles: {
12081209
}
12091210
12101211
const hasNextProject = ref(false);
1211-
async function sendMessage(status: "approved" | "rejected" | "withheld") {
1212+
async function sendMessage(status: ProjectStatus) {
12121213
try {
12131214
await useBaseFetch(`project/${props.project.id}`, {
12141215
method: "PATCH",

0 commit comments

Comments
 (0)