Move download counting to worker (#306)

* Move download counting to worker

* Run `cargo sqlx prepare`

* Format & some Clippy fixes
This commit is contained in:
Danielle
2022-02-21 18:57:40 -08:00
committed by GitHub
parent 9492363b22
commit 3f671b918a
13 changed files with 126 additions and 275 deletions

View File

@@ -347,16 +347,6 @@ impl Version {
.execute(&mut *transaction)
.await?;
sqlx::query!(
"
DELETE FROM downloads
WHERE downloads.version_id = $1
",
id as VersionId,
)
.execute(&mut *transaction)
.await?;
let files = sqlx::query!(
"
SELECT files.id, files.url, files.filename, files.is_primary FROM files