- Rewrite DiscordChannelSidebar with @dnd-kit drag-and-drop: rooms are sortable within categories; dragging onto a different category header assigns the room to that category - Add inline 'Add Category' button: Enter/Esc to confirm/cancel - Wire category create/move handlers in room.tsx via RoomContext - Fix onAiStreamChunk to accumulate content properly and avoid redundant re-renders during AI streaming (dedup guard) - No backend changes needed: category CRUD and room category update endpoints were already wired
63 lines
2.1 KiB
Rust
63 lines
2.1 KiB
Rust
pub mod captcha;
|
|
pub mod email;
|
|
pub mod login;
|
|
pub mod logout;
|
|
pub mod me;
|
|
pub mod password;
|
|
pub mod register;
|
|
// pub mod totp; // 2FA disabled
|
|
pub mod ws_token;
|
|
|
|
pub fn init_auth_routes(cfg: &mut actix_web::web::ServiceConfig) {
|
|
cfg.service(
|
|
actix_web::web::scope("/auth")
|
|
.route("/login", actix_web::web::post().to(login::api_auth_login))
|
|
.route(
|
|
"/register",
|
|
actix_web::web::post().to(register::api_auth_register),
|
|
)
|
|
.route(
|
|
"/logout",
|
|
actix_web::web::post().to(logout::api_auth_logout),
|
|
)
|
|
.route(
|
|
"/captcha",
|
|
actix_web::web::post().to(captcha::api_auth_captcha),
|
|
)
|
|
.route("/me", actix_web::web::post().to(me::api_auth_me))
|
|
.route(
|
|
"/password/change",
|
|
actix_web::web::post().to(password::api_user_change_password),
|
|
)
|
|
.route(
|
|
"/password/reset",
|
|
actix_web::web::post().to(password::api_user_request_password_reset),
|
|
)
|
|
.route(
|
|
"/password/confirm",
|
|
actix_web::web::post().to(password::api_user_confirm_password_reset),
|
|
)
|
|
// 2FA disabled {
|
|
// .route("/2fa/enable", actix_web::web::post().to(totp::api_2fa_enable))
|
|
// .route("/2fa/verify", actix_web::web::post().to(totp::api_2fa_verify))
|
|
// .route("/2fa/disable", actix_web::web::post().to(totp::api_2fa_disable))
|
|
// .route("/2fa/status", actix_web::web::post().to(totp::api_2fa_status))
|
|
// }
|
|
.route("/email", actix_web::web::post().to(email::api_email_get))
|
|
.route(
|
|
"/email/change",
|
|
actix_web::web::post().to(email::api_email_change),
|
|
)
|
|
.route(
|
|
"/email/verify",
|
|
actix_web::web::post().to(email::api_email_verify),
|
|
),
|
|
);
|
|
|
|
// WebSocket token endpoint
|
|
cfg.route(
|
|
"/ws/token",
|
|
actix_web::web::post().to(ws_token::ws_token_generate),
|
|
);
|
|
}
|