Skip to content

Commit 1f8a03c

Browse files
committed
fix: freeze mod download count temporarily
ffs
1 parent 2a99488 commit 1f8a03c

File tree

6 files changed

+14
-2
lines changed

6 files changed

+14
-2
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "geode-index"
3-
version = "0.30.2"
3+
version = "0.30.3"
44
edition = "2021"
55

66
[dependencies]

src/jobs/download_cache.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use sqlx::PgConnection;
22

33
pub async fn start(pool: &mut PgConnection) -> Result<(), String> {
4+
// TODO: unfreeze mod count
5+
return Ok(());
6+
47
// update mod_versions counts
58
if let Err(e) = sqlx::query!(
69
"UPDATE mod_versions mv SET download_count = mv.download_count + (

src/types/models/download.rs

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ pub async fn create_download(
77
mod_version_id: i32,
88
pool: &mut PgConnection,
99
) -> Result<bool, ApiError> {
10+
// TODO: unfreeze mod count
11+
return Ok(false);
12+
1013
let existing = match sqlx::query!(
1114
r#"
1215
SELECT * FROM mod_downloads

src/types/models/mod_entity.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,9 @@ impl Mod {
10451045
mod_id: &str,
10461046
pool: &mut PgConnection,
10471047
) -> Result<(), ApiError> {
1048+
// TODO: unfreeze mod count
1049+
return Ok(());
1050+
10481051
if let Err(e) = sqlx::query!(
10491052
"UPDATE mods m SET download_count = (
10501053
SELECT COUNT(DISTINCT md.ip) FROM mod_downloads md

src/types/models/mod_version.rs

+3
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,9 @@ impl ModVersion {
676676
mod_version_id: i32,
677677
pool: &mut PgConnection,
678678
) -> Result<(), ApiError> {
679+
// TODO: unfreeze mod count
680+
return Ok(());
681+
679682
if let Err(e) = sqlx::query!(
680683
"UPDATE mod_versions mv
681684
SET download_count = mv.download_count + (

0 commit comments

Comments
 (0)