Skip to content

Commit

Permalink
Refactor volume management to include library awareness, enhance fing…
Browse files Browse the repository at this point in the history
…erprint handling, and improve system volume interactions
  • Loading branch information
jamiepine committed Nov 3, 2024
1 parent bd00623 commit 378edcc
Show file tree
Hide file tree
Showing 9 changed files with 227 additions and 232 deletions.
17 changes: 9 additions & 8 deletions core/src/api/volumes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
R.router()
.procedure(
"list",
R.query(|node, _: ()| async move {
match node.volumes.list_system_volumes().await {
Ok(volumes) => Ok(volumes),
Err(e) => {
tracing::error!("Error listing volumes: {:?}", e);
Err(e.into())
R.with2(library())
.query(|(node, library), _: ()| async move {
match node.volumes.list_system_volumes(library).await {
Ok(volumes) => Ok(volumes),
Err(e) => {
tracing::error!("Error listing volumes: {:?}", e);
Err(e.into())
}
}
}
}),
}),
)
.procedure(
"track",
Expand Down
Loading

0 comments on commit 378edcc

Please sign in to comment.