1
0

Fix GV + Loader syncing on version create (#564)

* Fix GV + Loader syncing on version create

* Update rustc v
This commit is contained in:
Geometrically
2023-03-12 16:42:25 -07:00
committed by GitHub
parent 59d7bce518
commit 150329dd4a
4 changed files with 244 additions and 229 deletions

452
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -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"

View File

@@ -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

View File

@@ -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))
}