Version slugs (#533)

* Version slugs

* Get rid of new field, finish it up
This commit is contained in:
Geometrically
2023-02-15 13:38:37 -07:00
committed by GitHub
parent 8eb9fb1834
commit b056610eaa
6 changed files with 124 additions and 35 deletions

View File

@@ -308,7 +308,7 @@ pub async fn get_update_from_hash(
)
.await?;
if let Some(version_id) = version_ids.last() {
if let Some(version_id) = version_ids.first() {
let version_data =
database::models::Version::get_full(*version_id, &**pool)
.await?;
@@ -503,7 +503,7 @@ pub async fn update_files(
)
.await?;
if let Some(latest_version) = updated_versions.last() {
if let Some(latest_version) = updated_versions.first() {
let mut version_ids = version_ids.write().await;
version_ids.insert(*latest_version, row.hash);