Skip to content

Commit f2dc77b

Browse files
committed
oops v2
1 parent f13cc0e commit f2dc77b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/endpoints/mod_versions.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@ pub async fn download_version(
204204
// only accepted mods can have their download counts incremented
205205
// we'll just fix this once they're updated anyways
206206

207-
if mod_version.status == ModVersionStatusEnum::Accepted {
207+
if (downloaded_version || downloaded_mod) && mod_version.status == ModVersionStatusEnum::Accepted {
208208
tokio::spawn(async move {
209209
if downloaded_version {
210210
// we must nest more
211211
if let Err(e) = ModVersion::increment_downloads(mod_version.id, &mut pool).await
212212
{
213213
log::error!(
214-
"Failed increment downloads for mod version {}. Error: {}",
214+
"Failed to increment downloads for mod version {}. Error: {}",
215215
version,
216216
e
217217
);
@@ -221,7 +221,7 @@ pub async fn download_version(
221221
if downloaded_mod {
222222
if let Err(e) = Mod::increment_downloads(&mod_version.mod_id, &mut pool).await {
223223
log::error!(
224-
"Failed increment downloads for mod {}. Error: {}",
224+
"Failed to increment downloads for mod {}. Error: {}",
225225
name,
226226
e
227227
);

0 commit comments

Comments
 (0)