add: channels, messages
This commit is contained in:
parent
67492cf73f
commit
7774124bd0
40 changed files with 2238 additions and 115 deletions
|
@ -4,7 +4,13 @@ pub mod misc;
|
|||
pub mod mod_panel;
|
||||
pub mod profile;
|
||||
|
||||
use axum::{Router, routing::get};
|
||||
#[cfg(feature = "redis")]
|
||||
pub mod chats;
|
||||
|
||||
use axum::{
|
||||
routing::{get, post},
|
||||
Router,
|
||||
};
|
||||
use axum_extra::extract::CookieJar;
|
||||
use serde::Deserialize;
|
||||
use tetratto_core::{
|
||||
|
@ -82,6 +88,17 @@ pub fn routes() -> Router {
|
|||
.route("/post/{id}", get(communities::post_request))
|
||||
.route("/post/{id}/reposts", get(communities::reposts_request))
|
||||
.route("/question/{id}", get(communities::question_request))
|
||||
// chats
|
||||
.route("/chats", get(chats::redirect_request))
|
||||
.route("/chats/{community}/{channel}", get(chats::app_request))
|
||||
.route(
|
||||
"/chats/{community}/{channel}/_stream",
|
||||
get(chats::stream_request),
|
||||
)
|
||||
.route(
|
||||
"/chats/{community}/{channel}/_render",
|
||||
post(chats::message_request),
|
||||
)
|
||||
}
|
||||
|
||||
pub async fn render_error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue