You've already forked AstralRinth
forked from didirus/AstralRinth
fix: approve status incorrect (#4104)
This commit is contained in:
@@ -259,7 +259,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</ButtonStyled>
|
</ButtonStyled>
|
||||||
<ButtonStyled color="green">
|
<ButtonStyled color="green">
|
||||||
<button @click="sendMessage('approved')">
|
<button @click="sendMessage(project.requested_status ?? 'approved')">
|
||||||
<CheckIcon aria-hidden="true" />
|
<CheckIcon aria-hidden="true" />
|
||||||
Approve
|
Approve
|
||||||
</button>
|
</button>
|
||||||
@@ -355,6 +355,7 @@ import {
|
|||||||
renderHighlightedString,
|
renderHighlightedString,
|
||||||
type ModerationJudgements,
|
type ModerationJudgements,
|
||||||
type ModerationModpackItem,
|
type ModerationModpackItem,
|
||||||
|
type ProjectStatus,
|
||||||
} from "@modrinth/utils";
|
} from "@modrinth/utils";
|
||||||
import { computedAsync, useLocalStorage } from "@vueuse/core";
|
import { computedAsync, useLocalStorage } from "@vueuse/core";
|
||||||
import {
|
import {
|
||||||
@@ -527,7 +528,7 @@ function handleKeybinds(event: KeyboardEvent) {
|
|||||||
tryResetProgress: resetProgress,
|
tryResetProgress: resetProgress,
|
||||||
tryExitModeration: () => emit("exit"),
|
tryExitModeration: () => emit("exit"),
|
||||||
|
|
||||||
tryApprove: () => sendMessage("approved"),
|
tryApprove: () => sendMessage(props.project.requested_status),
|
||||||
tryReject: () => sendMessage("rejected"),
|
tryReject: () => sendMessage("rejected"),
|
||||||
tryWithhold: () => sendMessage("withheld"),
|
tryWithhold: () => sendMessage("withheld"),
|
||||||
tryEditMessage: goBackToStages,
|
tryEditMessage: goBackToStages,
|
||||||
@@ -1208,7 +1209,7 @@ function generateModpackMessage(allFiles: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const hasNextProject = ref(false);
|
const hasNextProject = ref(false);
|
||||||
async function sendMessage(status: "approved" | "rejected" | "withheld") {
|
async function sendMessage(status: ProjectStatus) {
|
||||||
try {
|
try {
|
||||||
await useBaseFetch(`project/${props.project.id}`, {
|
await useBaseFetch(`project/${props.project.id}`, {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
|
|||||||
Reference in New Issue
Block a user