Refacto get_root_folder_read_library_items method.
This commit is contained in:
@@ -21,6 +21,10 @@ pub struct LibraryRawItem {
|
||||
pub r#type: LibraryItemType,
|
||||
}
|
||||
impl LibraryRawItem {
|
||||
pub fn new(id: Option<Uuid>, name: String, r#type: LibraryItemType) -> Self {
|
||||
Self { id, name, r#type }
|
||||
}
|
||||
|
||||
pub fn map_to_library_item(&self) -> LibraryItem {
|
||||
LibraryItem {
|
||||
id: self.id.unwrap_or(Uuid::new_v4()),
|
||||
|
||||
Reference in New Issue
Block a user