You've already forked AstralRinth
forked from didirus/AstralRinth
Reports (#165)
* Reports WIP * Finish reports * Clippy fixes Co-authored-by: Geometrically <geometrically@pop-os.localdomain>
This commit is contained in:
@@ -217,6 +217,16 @@ impl Version {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
sqlx::query!(
|
||||
"
|
||||
DELETE FROM reports
|
||||
WHERE version_id = $1
|
||||
",
|
||||
id as VersionId,
|
||||
)
|
||||
.execute(exec)
|
||||
.await?;
|
||||
|
||||
sqlx::query!(
|
||||
"
|
||||
DELETE FROM game_versions_versions gvv
|
||||
@@ -569,13 +579,13 @@ impl Version {
|
||||
game_versions: v
|
||||
.game_versions
|
||||
.unwrap_or_default()
|
||||
.split(",")
|
||||
.split(',')
|
||||
.map(|x| x.to_string())
|
||||
.collect(),
|
||||
loaders: v
|
||||
.loaders
|
||||
.unwrap_or_default()
|
||||
.split(",")
|
||||
.split(',')
|
||||
.map(|x| x.to_string())
|
||||
.collect(),
|
||||
featured: v.featured,
|
||||
@@ -683,8 +693,8 @@ impl Version {
|
||||
downloads: v.downloads,
|
||||
release_channel: v.release_channel,
|
||||
files,
|
||||
game_versions: v.game_versions.unwrap_or_default().split(",").map(|x| x.to_string()).collect(),
|
||||
loaders: v.loaders.unwrap_or_default().split(",").map(|x| x.to_string()).collect(),
|
||||
game_versions: v.game_versions.unwrap_or_default().split(',').map(|x| x.to_string()).collect(),
|
||||
loaders: v.loaders.unwrap_or_default().split(',').map(|x| x.to_string()).collect(),
|
||||
featured: v.featured,
|
||||
dependencies,
|
||||
}
|
||||
@@ -714,6 +724,7 @@ pub struct FileHash {
|
||||
pub hash: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct QueryVersion {
|
||||
pub id: VersionId,
|
||||
pub mod_id: ModId,
|
||||
@@ -733,6 +744,7 @@ pub struct QueryVersion {
|
||||
pub dependencies: Vec<(VersionId, String)>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct QueryFile {
|
||||
pub id: FileId,
|
||||
pub url: String,
|
||||
|
||||
Reference in New Issue
Block a user