format,test,blah

This commit is contained in:
Connor Johnstone
2026-03-24 20:47:14 -04:00
parent 7b14ed593f
commit c5efe23d01

View File

@@ -94,15 +94,9 @@ async fn list_artists(
) -> Result<HttpResponse, ApiError> { ) -> Result<HttpResponse, ApiError> {
auth::require_auth(&session)?; auth::require_auth(&session)?;
let artists = queries::artists::list(state.db.conn(), query.limit, query.offset).await?; let artists = queries::artists::list(state.db.conn(), query.limit, query.offset).await?;
let wanted = queries::wanted::list(state.db.conn(), None, None).await?;
let mut items: Vec<ArtistListItem> = Vec::new(); let mut items: Vec<ArtistListItem> = Vec::new();
for a in &artists { for a in &artists {
let artist_wanted: Vec<_> = wanted
.iter()
.filter(|w| w.artist_id == Some(a.id))
.collect();
// Check if we have cached artist-level totals from a prior detail page load // Check if we have cached artist-level totals from a prior detail page load
let cache_key = format!("artist_totals:{}", a.id); let cache_key = format!("artist_totals:{}", a.id);
let cached_totals: Option<(u32, u32, u32)> = let cached_totals: Option<(u32, u32, u32)> =