summaryrefslogtreecommitdiff
path: root/src/channel/routes/mod.rs
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-10-23 21:56:31 -0400
committerKit La Touche <kit@transneptune.net>2024-10-23 21:56:31 -0400
commit1f769855df2d9cf2bca883a0475670f227e3678b (patch)
tree6c94d9c868eb022588a07245df978478034ac5dd /src/channel/routes/mod.rs
parent8f360dd9cc45bb14431238ccc5e3d137c020fa7b (diff)
parent461814e5174cef1be3e07b4e4069314e9bcbedd6 (diff)
Merge branch 'main' into wip/mobile
Diffstat (limited to 'src/channel/routes/mod.rs')
-rw-r--r--src/channel/routes/mod.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/channel/routes/mod.rs b/src/channel/routes/mod.rs
new file mode 100644
index 0000000..696bd72
--- /dev/null
+++ b/src/channel/routes/mod.rs
@@ -0,0 +1,19 @@
+use axum::{
+ routing::{delete, post},
+ Router,
+};
+
+use crate::app::App;
+
+mod channel;
+mod post;
+
+#[cfg(test)]
+mod test;
+
+pub fn router() -> Router<App> {
+ Router::new()
+ .route("/api/channels", post(post::handler))
+ .route("/api/channels/:channel", post(channel::post::handler))
+ .route("/api/channels/:channel", delete(channel::delete::handler))
+}