You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-04 18:42:14 +03:00
config: allow serving the admin API routes
This commit is contained in:
@@ -228,6 +228,10 @@ pub fn build_router(
|
||||
mas_config::HttpResource::Compat => {
|
||||
router.merge(mas_handlers::compat_router::<AppState>())
|
||||
}
|
||||
mas_config::HttpResource::AdminApi => {
|
||||
let (_, api_router) = mas_handlers::admin_api_router::<AppState>();
|
||||
router.merge(api_router)
|
||||
}
|
||||
// TODO: do a better handler here
|
||||
mas_config::HttpResource::ConnectionInfo => router.route(
|
||||
"/connection-info",
|
||||
|
@@ -312,6 +312,9 @@ pub enum Resource {
|
||||
path: Utf8PathBuf,
|
||||
},
|
||||
|
||||
/// Admin API, served at `/api/admin/v1`
|
||||
AdminApi,
|
||||
|
||||
/// Mount a "/connection-info" handler which helps debugging informations on
|
||||
/// the upstream connection
|
||||
#[serde(rename = "connection-info")]
|
||||
|
@@ -788,6 +788,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Admin API, served at `/api/admin/v1`",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"adminapi"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "Mount a \"/connection-info\" handler which helps debugging informations on the upstream connection",
|
||||
"type": "object",
|
||||
|
Reference in New Issue
Block a user