|
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> |
@@ -364,6 +364,7 @@ import { |
364 | 364 | type ModerationJudgements, |
365 | 365 | type ModerationModpackItem, |
366 | 366 | type Project, |
| 367 | + type ProjectStatus, |
367 | 368 | renderHighlightedString, |
368 | 369 | } from '@modrinth/utils' |
369 | 370 | import { computedAsync, useLocalStorage } from '@vueuse/core' |
@@ -529,7 +530,7 @@ function handleKeybinds(event: KeyboardEvent) { |
529 | 530 | tryResetProgress: resetProgress, |
530 | 531 | tryExitModeration: () => emit('exit'), |
531 | 532 |
|
532 | | - tryApprove: () => sendMessage('approved'), |
| 533 | + tryApprove: () => sendMessage(props.project.requested_status), |
533 | 534 | tryReject: () => sendMessage('rejected'), |
534 | 535 | tryWithhold: () => sendMessage('withheld'), |
535 | 536 | tryEditMessage: goBackToStages, |
@@ -1210,7 +1211,7 @@ function generateModpackMessage(allFiles: { |
1210 | 1211 | } |
1211 | 1212 |
|
1212 | 1213 | const hasNextProject = ref(false) |
1213 | | -async function sendMessage(status: 'approved' | 'rejected' | 'withheld') { |
| 1214 | +async function sendMessage(status: ProjectStatus) { |
1214 | 1215 | try { |
1215 | 1216 | await useBaseFetch(`project/${props.project.id}`, { |
1216 | 1217 | method: 'PATCH', |
|
0 commit comments