Create & list tokens
This commit is contained in:
@@ -9,7 +9,9 @@ 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::{auth_controller, matrix_link_controller, server_controller};
|
||||
use matrixgw_backend::controllers::{
|
||||
auth_controller, matrix_link_controller, server_controller, tokens_controller,
|
||||
};
|
||||
use matrixgw_backend::matrix_connection::matrix_manager::MatrixManagerActor;
|
||||
use matrixgw_backend::users::User;
|
||||
use ractor::Actor;
|
||||
@@ -110,6 +112,9 @@ async fn main() -> std::io::Result<()> {
|
||||
"/api/matrix_link/set_recovery_key",
|
||||
web::post().to(matrix_link_controller::set_recovery_key),
|
||||
)
|
||||
// API Tokens controller
|
||||
.route("/api/token", web::post().to(tokens_controller::create))
|
||||
.route("/api/tokens", web::get().to(tokens_controller::get_list))
|
||||
})
|
||||
.workers(4)
|
||||
.bind(&AppConfig::get().listen_address)?
|
||||
|
||||
Reference in New Issue
Block a user