Commonize and distinguish a lot of struct names in labrinth::database::models (#3691)

This commit is contained in:
Josiah Glosson
2025-05-24 04:38:43 -05:00
committed by GitHub
parent 9c1bdf16e4
commit 4e4a7be7ef
78 changed files with 1075 additions and 1009 deletions

View File

@@ -288,17 +288,20 @@ async fn get_example_version_fields(
None => return Ok(None),
};
let vid =
match project_item::Project::get_id(project_id.into(), &**pool, redis)
.await?
.and_then(|p| p.versions.first().cloned())
{
Some(vid) => vid,
None => return Ok(None),
};
let vid = match project_item::DBProject::get_id(
project_id.into(),
&**pool,
redis,
)
.await?
.and_then(|p| p.versions.first().cloned())
{
Some(vid) => vid,
None => return Ok(None),
};
let example_version =
match version_item::Version::get(vid, &**pool, redis).await? {
match version_item::DBVersion::get(vid, &**pool, redis).await? {
Some(version) => version,
None => return Ok(None),
};