Compare commits
No commits in common. "83c31d679d8a33bb45e01dcd70f381d49e80d008" and "e44d80ee4cf31ab8f91459871801676e582ce1cb" have entirely different histories.
83c31d679d
...
e44d80ee4c
4 changed files with 2 additions and 9 deletions
|
@ -1,7 +0,0 @@
|
||||||
SELECT
|
|
||||||
cache_name,
|
|
||||||
uploaded,
|
|
||||||
downloads,
|
|
||||||
max_downloads
|
|
||||||
FROM records
|
|
||||||
WHERE cache_name = ?;
|
|
|
@ -1,3 +1,3 @@
|
||||||
UPDATE record
|
UPDATE record
|
||||||
SET downloads = downloads + 1
|
SET downloads = downloads + 1
|
||||||
WHERE cache_name = ?;
|
WHERE cache_name = ?
|
||||||
|
|
|
@ -86,7 +86,7 @@ async fn upload_to_zip(
|
||||||
let mut conn = state.pool.acquire().await.unwrap();
|
let mut conn = state.pool.acquire().await.unwrap();
|
||||||
let cache_name = cache_name.clone();
|
let cache_name = cache_name.clone();
|
||||||
|
|
||||||
sqlx::query_file!("queries/records/new_record.sql", cache_name, 5)
|
sqlx::query_file!("queries/records/new.sql", cache_name, 5)
|
||||||
.execute(&mut *conn)
|
.execute(&mut *conn)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?;
|
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?;
|
||||||
|
|
Loading…
Reference in a new issue