Can get information about rooms
This commit is contained in:
@@ -9,6 +9,7 @@ use actix_web::{App, HttpServer, web};
|
||||
use matrixgw_backend::app_config::AppConfig;
|
||||
use matrixgw_backend::broadcast_messages::BroadcastMessage;
|
||||
use matrixgw_backend::constants;
|
||||
use matrixgw_backend::controllers::matrix::matrix_room_controller;
|
||||
use matrixgw_backend::controllers::{
|
||||
auth_controller, matrix_link_controller, matrix_sync_thread_controller, server_controller,
|
||||
tokens_controller, ws_controller,
|
||||
@@ -134,6 +135,15 @@ async fn main() -> std::io::Result<()> {
|
||||
web::get().to(matrix_sync_thread_controller::status),
|
||||
)
|
||||
.service(web::resource("/api/ws").route(web::get().to(ws_controller::ws)))
|
||||
// Matrix room controller
|
||||
.route(
|
||||
"/api/matrix/room/joined",
|
||||
web::get().to(matrix_room_controller::joined_rooms),
|
||||
)
|
||||
.route(
|
||||
"/api/matrix/room/{id}",
|
||||
web::get().to(matrix_room_controller::single_room_info),
|
||||
)
|
||||
})
|
||||
.workers(4)
|
||||
.bind(&AppConfig::get().listen_address)?
|
||||
|
||||
Reference in New Issue
Block a user