diff options
Diffstat (limited to 'logic/src/node.rs')
| -rw-r--r-- | logic/src/node.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/logic/src/node.rs b/logic/src/node.rs index 3e527c8..94be1a0 100644 --- a/logic/src/node.rs +++ b/logic/src/node.rs @@ -6,7 +6,7 @@ use crate::{DATABASE, filter_sort::filter_and_sort_nodes, session::Session}; use anyhow::{Result, anyhow}; use jellycommon::{ - Node, NodeID, NodeKind, Visibility, + IdentifierType, Node, NodeID, NodeKind, Visibility, api::{ApiNodeResponse, NodeFilterSort, SortOrder, SortProperty}, user::{NodeUserData, WatchedState}, }; @@ -118,8 +118,12 @@ pub fn get_nodes_modified_since(_session: &Session, since: u64) -> Result<Vec<No Ok(nodes) } -pub fn get_node_by_eid(_session: &Session, platform: &str, eid: &str) -> Result<Option<NodeID>> { - DATABASE.get_node_external_id(platform, eid) +pub fn get_node_by_eid( + _session: &Session, + ty: IdentifierType, + value: &str, +) -> Result<Option<NodeID>> { + DATABASE.get_node_by_identifier(ty, value) } pub fn node_id_to_slug(_session: &Session, id: NodeID) -> Result<String> { Ok(DATABASE |