From a15e3d580124f561864c6a39f1e035eb1b3aab13 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 30 Jun 2025 22:00:57 -0400 Subject: Rename "channel" to "conversation" within the server. I've split this from the schema and API changes because, frankly, it's huge. Annoyingly so. There are no semantic changes in this, it's all symbol changes, but there are a _lot_ of them because the term "channel" leaks all over everything in a service whose primary role is managing messages sent to channels (now, conversations). I found a buggy test while working on this! It's not fixed in this commit, because it felt mean to hide a real change in the middle of this much chaff. --- src/routes.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/routes.rs') diff --git a/src/routes.rs b/src/routes.rs index 1e66582..ca4c60c 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -4,7 +4,7 @@ use axum::{ routing::{delete, get, post}, }; -use crate::{app::App, boot, channel, event, expire, invite, message, setup, ui, user}; +use crate::{app::App, boot, conversation, event, expire, invite, message, setup, ui, user}; pub fn routes(app: &App) -> Router { // UI routes that can be accessed before the administrator completes setup. @@ -15,7 +15,7 @@ pub fn routes(app: &App) -> Router { // UI routes that require the administrator to complete setup first. let ui_setup_required = Router::new() .route("/", get(ui::handlers::index)) - .route("/ch/{channel}", get(ui::handlers::channel)) + .route("/ch/{channel}", get(ui::handlers::conversation)) .route("/invite/{invite}", get(ui::handlers::invite)) .route("/login", get(ui::handlers::login)) .route("/me", get(ui::handlers::me)) @@ -29,9 +29,15 @@ pub fn routes(app: &App) -> Router { .route("/api/auth/login", post(user::handlers::login)) .route("/api/auth/logout", post(user::handlers::logout)) .route("/api/boot", get(boot::handlers::boot)) - .route("/api/channels", post(channel::handlers::create)) - .route("/api/channels/{channel}", post(channel::handlers::send)) - .route("/api/channels/{channel}", delete(channel::handlers::delete)) + .route("/api/channels", post(conversation::handlers::create)) + .route( + "/api/channels/{channel}", + post(conversation::handlers::send), + ) + .route( + "/api/channels/{channel}", + delete(conversation::handlers::delete), + ) .route("/api/events", get(event::handlers::stream)) .route("/api/invite", post(invite::handlers::issue)) .route("/api/invite/{invite}", get(invite::handlers::get)) -- cgit v1.2.3