Updates for the "full flow"
This commit is contained in:
@@ -9,6 +9,8 @@ use crate::error::{DbError, DbResult};
|
||||
pub async fn add(
|
||||
db: &DatabaseConnection,
|
||||
item_type: ItemType,
|
||||
name: &str,
|
||||
musicbrainz_id: Option<&str>,
|
||||
artist_id: Option<i32>,
|
||||
album_id: Option<i32>,
|
||||
track_id: Option<i32>,
|
||||
@@ -16,6 +18,8 @@ pub async fn add(
|
||||
let now = Utc::now().naive_utc();
|
||||
let active = ActiveModel {
|
||||
item_type: Set(item_type),
|
||||
name: Set(name.to_string()),
|
||||
musicbrainz_id: Set(musicbrainz_id.map(String::from)),
|
||||
artist_id: Set(artist_id),
|
||||
album_id: Set(album_id),
|
||||
track_id: Set(track_id),
|
||||
|
||||
Reference in New Issue
Block a user