add /_conduwuit/server_version
route
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
4f1f6fa56f
commit
567b24e410
2 changed files with 13 additions and 1 deletions
|
@ -76,6 +76,17 @@ pub async fn syncv3_client_server_json() -> Result<impl IntoResponse> {
|
|||
|
||||
Ok(Json(serde_json::json!({
|
||||
"server": server_url,
|
||||
"version": format!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"))
|
||||
"version": format!("Conduwuit {}", env!("CARGO_PKG_VERSION"))
|
||||
})))
|
||||
}
|
||||
|
||||
/// # `GET /_conduwuit/server_version`
|
||||
///
|
||||
/// Conduwuit-specific API to get the server version, results akin to
|
||||
/// `/_matrix/federation/v1/version`
|
||||
pub async fn conduwuit_server_version() -> Result<impl IntoResponse> {
|
||||
Ok(Json(serde_json::json!({
|
||||
"name": "Conduwuit",
|
||||
"version": env!("CARGO_PKG_VERSION"),
|
||||
})))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue