aboutsummaryrefslogtreecommitdiff
path: root/common/src/routes.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-28 18:27:03 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-28 18:27:03 +0200
commit51761cbdefa39107b9e1f931f1aa8df6aebb2a94 (patch)
tree957ca180786ece777e6e1153ada91da741d845ec /common/src/routes.rs
parent80d28b764c95891551e28c395783f5ff9d065743 (diff)
downloadjellything-51761cbdefa39107b9e1f931f1aa8df6aebb2a94.tar
jellything-51761cbdefa39107b9e1f931f1aa8df6aebb2a94.tar.bz2
jellything-51761cbdefa39107b9e1f931f1aa8df6aebb2a94.tar.zst
many much more generic refactor
Diffstat (limited to 'common/src/routes.rs')
-rw-r--r--common/src/routes.rs17
1 files changed, 17 insertions, 0 deletions
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 <metamuffin.org>
+*/
+
+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)
+}