Add route "GET /.well-known/matrix/server"
This commit is contained in:
parent
a263fe85d6
commit
3d76923802
|
@ -4,6 +4,7 @@ mod reports;
|
||||||
mod sessions;
|
mod sessions;
|
||||||
mod team;
|
mod team;
|
||||||
mod users;
|
mod users;
|
||||||
|
mod well_known;
|
||||||
|
|
||||||
pub fn routes() -> Vec<rocket::Route> {
|
pub fn routes() -> Vec<rocket::Route> {
|
||||||
routes![
|
routes![
|
||||||
|
@ -16,5 +17,6 @@ pub fn routes() -> Vec<rocket::Route> {
|
||||||
team::index,
|
team::index,
|
||||||
users::new,
|
users::new,
|
||||||
users::create,
|
users::create,
|
||||||
|
well_known::matrix::server::show,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
pub mod matrix;
|
|
@ -0,0 +1 @@
|
||||||
|
pub mod server;
|
|
@ -0,0 +1,10 @@
|
||||||
|
use rocket::http::ContentType;
|
||||||
|
use rocket::response::content::Content;
|
||||||
|
|
||||||
|
#[get("/.well-known/matrix/server")]
|
||||||
|
pub fn show() -> Content<String> {
|
||||||
|
Content(
|
||||||
|
ContentType::JSON,
|
||||||
|
"{ \"m.server\": \"matrix.fedihub.com\" }".to_string(),
|
||||||
|
)
|
||||||
|
}
|
Reference in New Issue