Compare commits

..

1 Commits

Author SHA1 Message Date
Connor Johnstone 1ff385c826 fixed deduplication once again. for real this time I think 2026-03-24 12:51:42 -04:00
+10
View File
@@ -69,6 +69,16 @@ pub async fn update_status(
Ok(active.update(db).await?) Ok(active.update(db).await?)
} }
pub async fn find_by_mbid(
db: &DatabaseConnection,
musicbrainz_id: &str,
) -> DbResult<Option<WantedItem>> {
Ok(WantedItems::find()
.filter(wanted_item::Column::MusicbrainzId.eq(musicbrainz_id))
.one(db)
.await?)
}
pub async fn remove(db: &DatabaseConnection, id: i32) -> DbResult<()> { pub async fn remove(db: &DatabaseConnection, id: i32) -> DbResult<()> {
WantedItems::delete_by_id(id).exec(db).await?; WantedItems::delete_by_id(id).exec(db).await?;
Ok(()) Ok(())