Proper handling of modpack loaders (#4940)

* fix handling modpack loader

* fix order

* increase timeout

* fix search erroring on non alphanumeric input for searching project id
This commit is contained in:
Truman Gao
2025-12-19 15:24:40 -08:00
committed by GitHub
parent 67835b04a8
commit 1e9e13aebb
6 changed files with 20 additions and 14 deletions

View File

@@ -297,7 +297,7 @@ export function createManageVersionContext(
try {
if (!version.version_id) throw new Error('Version ID is required to save edits.')
await labrinth.versions_v3.modifyVersion(version.version_id, {
const data: Labrinth.Versions.v3.ModifyVersionRequest = {
name: version.name || version.version_number,
version_number: version.version_number,
changelog: version.changelog,
@@ -313,7 +313,9 @@ export function createManageVersionContext(
hash: file.hashes.sha1,
file_type: file.file_type ?? null,
})),
})
}
await labrinth.versions_v3.modifyVersion(version.version_id, data)
if (files.length > 0) {
await labrinth.versions_v3.addFilesToVersion(version.version_id, files)