Testing bug fixes (#788)

* fixes

* adds tests- fixes failures

* changes

* moved transaction commits/caches around

* collections nullable

* merge fixes

* sqlx prepare

* revs

* lf fixes

* made changes back

* added collections update

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Wyatt Verchere
2023-12-14 15:19:50 -07:00
committed by GitHub
parent 50e89ad98b
commit f939e59463
33 changed files with 494 additions and 112 deletions

View File

@@ -14,7 +14,7 @@ use crate::models::projects::{
ProjectStatus, Version, VersionFile, VersionStatus, VersionType,
};
use crate::models::threads::ThreadId;
use crate::routes::v2_reroute;
use crate::routes::v2_reroute::{self, capitalize_first};
use chrono::{DateTime, Utc};
use itertools::Itertools;
use serde::{Deserialize, Serialize};
@@ -395,11 +395,3 @@ impl TryFrom<Link> for DonationLink {
})
}
}
fn capitalize_first(input: &str) -> String {
let mut result = input.to_owned();
if let Some(first_char) = result.get_mut(0..1) {
first_char.make_ascii_uppercase();
}
result
}

View File

@@ -22,7 +22,7 @@ pub struct Collection {
/// The title or name of the collection.
pub name: String,
/// A short description of the collection.
pub description: String,
pub description: Option<String>,
/// An icon URL for the collection.
pub icon_url: Option<String>,