You've already forked AstralRinth
forked from didirus/AstralRinth
Fix GV + Loader syncing on version create (#564)
* Fix GV + Loader syncing on version create * Update rustc v
This commit is contained in:
452
Cargo.lock
generated
452
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ path = "src/main.rs"
|
||||
actix = "0.13.0"
|
||||
actix-web = "4.3.0"
|
||||
actix-rt = "2.8.0"
|
||||
actix-multipart = "0.5.0"
|
||||
actix-multipart = "0.6.0"
|
||||
actix-cors = "0.6.4"
|
||||
|
||||
tokio = { version = "1.25.0", features = ["sync"] }
|
||||
@@ -67,8 +67,8 @@ thiserror = "1.0.38"
|
||||
sqlx = { version = "0.6.2", features = ["runtime-actix-rustls", "postgres", "chrono", "offline", "macros", "migrate", "decimal", "json"] }
|
||||
rust_decimal = { version = "1.28.1", features = ["serde-with-float", "serde-with-str"] }
|
||||
|
||||
sentry = { version = "0.29.3", features = ["profiling"] }
|
||||
sentry-actix = "0.29.3"
|
||||
sentry = { version = "0.30.0", features = ["profiling"] }
|
||||
sentry-actix = "0.30.0"
|
||||
|
||||
image = "0.24.5"
|
||||
color-thief = "0.2.2"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM rust:1.65.0 as build
|
||||
FROM rust:1.68.0 as build
|
||||
ENV PKG_CONFIG_ALLOW_CROSS=1
|
||||
|
||||
WORKDIR /usr/src/labrinth
|
||||
|
||||
@@ -425,14 +425,6 @@ async fn version_create_inner(
|
||||
.insert_many(users, &mut *transaction)
|
||||
.await?;
|
||||
|
||||
models::Project::update_game_versions(
|
||||
builder.project_id,
|
||||
&mut *transaction,
|
||||
)
|
||||
.await?;
|
||||
models::Project::update_loaders(builder.project_id, &mut *transaction)
|
||||
.await?;
|
||||
|
||||
let response = Version {
|
||||
id: builder.version_id.into(),
|
||||
project_id: builder.project_id.into(),
|
||||
@@ -477,8 +469,13 @@ async fn version_create_inner(
|
||||
loaders: version_data.loaders,
|
||||
};
|
||||
|
||||
let project_id = builder.project_id;
|
||||
builder.insert(transaction).await?;
|
||||
|
||||
models::Project::update_game_versions(project_id, &mut *transaction)
|
||||
.await?;
|
||||
models::Project::update_loaders(project_id, &mut *transaction).await?;
|
||||
|
||||
Ok(HttpResponse::Ok().json(response))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user