diff options
author | metamuffin <metamuffin@disroot.org> | 2023-08-03 00:01:51 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-08-03 00:01:51 +0200 |
commit | 9aa0cceedb52ddea5b08af7372f4c87f60e401d4 (patch) | |
tree | 557edb300af17925173b54ad1cb1b5655ccabd17 /server/src/routes/ui/node.rs | |
parent | 8e33fcdfbd9df042c0cfd8e9a2084993313961c9 (diff) | |
download | jellything-9aa0cceedb52ddea5b08af7372f4c87f60e401d4.tar jellything-9aa0cceedb52ddea5b08af7372f4c87f60e401d4.tar.bz2 jellything-9aa0cceedb52ddea5b08af7372f4c87f60e401d4.tar.zst |
not exposing private data
Diffstat (limited to 'server/src/routes/ui/node.rs')
-rw-r--r-- | server/src/routes/ui/node.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs index 93186bf..a784482 100644 --- a/server/src/routes/ui/node.rs +++ b/server/src/routes/ui/node.rs @@ -17,7 +17,7 @@ use crate::{ uri, }; use anyhow::{anyhow, Context}; -use jellycommon::{Node, NodeKind}; +use jellycommon::{Node, NodeKind, NodePublic}; use rocket::{get, serde::json::Json, Either, State}; #[get("/n/<id>")] @@ -26,7 +26,7 @@ pub async fn r_library_node( id: String, db: &State<Database>, aj: AcceptJson, -) -> Result<Either<DynLayoutPage<'_>, Json<Node>>, MyError> { +) -> Result<Either<DynLayoutPage<'_>, Json<NodePublic>>, MyError> { let node = db .node .get(&id) @@ -34,7 +34,7 @@ pub async fn r_library_node( .ok_or(anyhow!("node does not exist"))?; if *aj { - return Ok(Either::Right(Json(node))); + return Ok(Either::Right(Json(node.public))); } let children = node |