|
259 | 259 | </button> |
260 | 260 | </ButtonStyled> |
261 | 261 | <ButtonStyled color="green"> |
262 | | - <button @click="sendMessage('approved')"> |
| 262 | + <button @click="sendMessage(project.requested_status ?? 'approved')"> |
263 | 263 | <CheckIcon aria-hidden="true" /> |
264 | 264 | Approve |
265 | 265 | </button> |
@@ -355,6 +355,7 @@ import { |
355 | 355 | renderHighlightedString, |
356 | 356 | type ModerationJudgements, |
357 | 357 | type ModerationModpackItem, |
| 358 | + type ProjectStatus, |
358 | 359 | } from "@modrinth/utils"; |
359 | 360 | import { computedAsync, useLocalStorage } from "@vueuse/core"; |
360 | 361 | import { |
@@ -527,7 +528,7 @@ function handleKeybinds(event: KeyboardEvent) { |
527 | 528 | tryResetProgress: resetProgress, |
528 | 529 | tryExitModeration: () => emit("exit"), |
529 | 530 |
|
530 | | - tryApprove: () => sendMessage("approved"), |
| 531 | + tryApprove: () => sendMessage(props.project.requested_status), |
531 | 532 | tryReject: () => sendMessage("rejected"), |
532 | 533 | tryWithhold: () => sendMessage("withheld"), |
533 | 534 | tryEditMessage: goBackToStages, |
@@ -1208,7 +1209,7 @@ function generateModpackMessage(allFiles: { |
1208 | 1209 | } |
1209 | 1210 |
|
1210 | 1211 | const hasNextProject = ref(false); |
1211 | | -async function sendMessage(status: "approved" | "rejected" | "withheld") { |
| 1212 | +async function sendMessage(status: ProjectStatus) { |
1212 | 1213 | try { |
1213 | 1214 | await useBaseFetch(`project/${props.project.id}`, { |
1214 | 1215 | method: "PATCH", |
|
0 commit comments