From 51761cbdefa39107b9e1f931f1aa8df6aebb2a94 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 28 Apr 2025 18:27:03 +0200 Subject: many much more generic refactor --- common/src/routes.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 common/src/routes.rs (limited to 'common/src/routes.rs') diff --git a/common/src/routes.rs b/common/src/routes.rs new file mode 100644 index 0000000..71ca3fa --- /dev/null +++ b/common/src/routes.rs @@ -0,0 +1,17 @@ +/* + This file is part of jellything (https://codeberg.org/metamuffin/jellything) + which is licensed under the GNU Affero General Public License (version 3); see /COPYING. + Copyright (C) 2025 metamuffin +*/ + +use crate::NodeID; + +pub fn u_home() -> String { + "/home".to_owned() +} +pub fn u_node_id(node: NodeID) -> String { + format!("/n/{}", node) +} +pub fn u_node_slug(node: &str) -> String { + format!("/n/{}", node) +} -- cgit v1.2.3-70-g09d2