Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e4947191d0 |
@@ -69,6 +69,18 @@ pub async fn update_status(
|
||||
Ok(active.update(db).await?)
|
||||
}
|
||||
|
||||
pub async fn update_mbid(
|
||||
db: &DatabaseConnection,
|
||||
id: i32,
|
||||
musicbrainz_id: &str,
|
||||
) -> DbResult<WantedItem> {
|
||||
let existing = get_by_id(db, id).await?;
|
||||
let mut active: ActiveModel = existing.into();
|
||||
active.musicbrainz_id = Set(Some(musicbrainz_id.to_string()));
|
||||
active.updated_at = Set(Utc::now().naive_utc());
|
||||
Ok(active.update(db).await?)
|
||||
}
|
||||
|
||||
pub async fn find_by_mbid(
|
||||
db: &DatabaseConnection,
|
||||
musicbrainz_id: &str,
|
||||
|
||||
Reference in New Issue
Block a user