fixed deduplication once again. for real this time I think
This commit is contained in:
@@ -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(())
|
||||||
|
|||||||
Reference in New Issue
Block a user