Remove pending- prefix from publish table row keys
This commit is contained in:
parent
120e701443
commit
54af762365
@ -276,8 +276,11 @@ export function PublishModal({
|
||||
);
|
||||
|
||||
const modrinthRows: ModrinthTableRow[] = useMemo(() => {
|
||||
// 行 key 发布时会作为 mc_version 直接传入后端 API,严禁加任何前缀:
|
||||
// 此处曾加 "pending-" 前缀,导致后端准备阶段报 Invalid SemVer: "pending-1.19"。
|
||||
// 教训:所有要传入 API 的 key 都不能加前缀(行类型区分请用 kind 字段)。
|
||||
const pending: ModrinthTableRow[] = publishVersions.map((v) => ({
|
||||
key: `pending-${v.key}`,
|
||||
key: v.key,
|
||||
kind: "pending",
|
||||
pending: v,
|
||||
modrinthVersion: v.modrinthVersion,
|
||||
@ -316,8 +319,11 @@ export function PublishModal({
|
||||
);
|
||||
|
||||
const curseforgeRows: CurseforgeTableRow[] = useMemo(() => {
|
||||
// 行 key 发布时会作为 mc_version 直接传入后端 API,严禁加任何前缀:
|
||||
// 此处曾加 "pending-" 前缀,导致后端准备阶段报 Invalid SemVer: "pending-1.19"。
|
||||
// 教训:所有要传入 API 的 key 都不能加前缀(行类型区分请用 kind 字段)。
|
||||
const pending: CurseforgeTableRow[] = publishVersions.map((v) => ({
|
||||
key: `pending-${v.key}`,
|
||||
key: v.key,
|
||||
kind: "pending",
|
||||
pending: v,
|
||||
mc_version: v.mc_version,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user