Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/app-frontend/src/providers/content-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,11 @@ export function createContentInstall(opts: {
) {
const project: Labrinth.Projects.v2.Project = await get_project(projectId, 'must_revalidate')

if (!project) {
opts.handleError(`Project not found: '${projectId}'`)
return
}

if (project.project_type === 'modpack') {
const version = versionId ?? project.versions[project.versions.length - 1]
const packs = await list()
Expand Down
9 changes: 7 additions & 2 deletions packages/app-lib/src/state/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,8 +1102,13 @@ impl CachedEntry {
.collect::<Vec<_>>()
.chunks(MAX_REQUEST_SIZE)
.map(|chunk| {
serde_json::to_string(&chunk)
.map(|keys| format!("{api_url}{url}{keys}"))
serde_json::to_string(&chunk).map(|keys| {
format!(
"{api_url}{url}{}",
url::form_urlencoded::byte_serialize(keys.as_bytes())
.collect::<String>()
)
})
})
.collect::<Result<Vec<_>, _>>()?;

Expand Down