Compare commits
2 Commits
310da11937
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20ff3453bc | ||
|
|
bff85c27b7 |
@@ -36,8 +36,6 @@ jobs:
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9.15.0
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
@@ -2,6 +2,7 @@ use crate::pack::install_from::{CreatePack, CreatePackDescription};
|
||||
use crate::pack::install_mrpack::install_zipped_mrpack_files;
|
||||
use crate::profile;
|
||||
use crate::state::ModLoader;
|
||||
use crate::util::fetch::DownloadReason;
|
||||
use crate::{ErrorKind, State};
|
||||
use chrono::{TimeZone, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -259,6 +260,11 @@ pub async fn install(id: String) -> crate::Result<ConnectedPack> {
|
||||
let state = State::get().await?;
|
||||
let pack = get_by_id(&state.pool, &id).await?;
|
||||
let bytes = fetch_mrpack(&pack.mrpack_url, &pack.sha512).await?;
|
||||
let download_reason = if pack.profile_path.is_some() {
|
||||
DownloadReason::Update
|
||||
} else {
|
||||
DownloadReason::Modpack
|
||||
};
|
||||
|
||||
let profile_path = if let Some(profile_path) = &pack.profile_path {
|
||||
profile_path.clone()
|
||||
@@ -287,7 +293,7 @@ pub async fn install(id: String) -> crate::Result<ConnectedPack> {
|
||||
},
|
||||
};
|
||||
|
||||
install_zipped_mrpack_files(create_pack, true).await?;
|
||||
install_zipped_mrpack_files(create_pack, true, download_reason).await?;
|
||||
|
||||
sqlx::query(
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user