* plugins; datapacks

* merge fixes/changes

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Wyatt Verchere
2023-11-25 17:11:38 -08:00
committed by GitHub
parent 172b93d07f
commit bad350e49b
9 changed files with 163 additions and 90 deletions

View File

@@ -85,6 +85,7 @@ pub struct Loader {
pub icon: String,
pub supported_project_types: Vec<String>,
pub supported_games: Vec<String>, // slugs
pub metadata: serde_json::Value,
}
impl Loader {
@@ -136,7 +137,7 @@ impl Loader {
let result = sqlx::query!(
"
SELECT l.id id, l.loader loader, l.icon icon,
SELECT l.id id, l.loader loader, l.icon icon, l.metadata metadata,
ARRAY_AGG(DISTINCT pt.name) filter (where pt.name is not null) project_types,
ARRAY_AGG(DISTINCT g.slug) filter (where g.slug is not null) games
FROM loaders l
@@ -161,7 +162,9 @@ impl Loader {
.collect(),
supported_games: x
.games
.unwrap_or_default()
.unwrap_or_default(),
metadata: x.metadata
}))
})
.try_collect::<Vec<_>>()