Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ff385c826 |
@@ -69,6 +69,16 @@ pub async fn update_status(
|
||||
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<()> {
|
||||
WantedItems::delete_by_id(id).exec(db).await?;
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user