split / cleanup core utils.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-05-27 20:05:33 +00:00
parent 5fe5ab279c
commit 90d9a997a5
13 changed files with 205 additions and 191 deletions

View file

@ -10,7 +10,7 @@ use ruma::api::client::{
error::ErrorKind,
};
use crate::{services, utils::conduwuit_version, Error, Result, Ruma};
use crate::{services, Error, Result, Ruma};
/// # `GET /_matrix/client/versions`
///
@ -145,7 +145,7 @@ pub(crate) async fn syncv3_client_server_json() -> Result<impl IntoResponse> {
Ok(Json(serde_json::json!({
"server": server_url,
"version": conduwuit_version(),
"version": conduit::version::conduwuit(),
})))
}
@ -156,7 +156,7 @@ pub(crate) async fn syncv3_client_server_json() -> Result<impl IntoResponse> {
pub(crate) async fn conduwuit_server_version() -> Result<impl IntoResponse> {
Ok(Json(serde_json::json!({
"name": "conduwuit",
"version": conduwuit_version(),
"version": conduit::version::conduwuit(),
})))
}

View file

@ -74,7 +74,7 @@ pub(crate) async fn get_server_version_route(
Ok(get_server_version::v1::Response {
server: Some(get_server_version::v1::Server {
name: Some("Conduwuit".to_owned()),
version: Some(utils::conduwuit_version()),
version: Some(conduit::version::conduwuit()),
}),
})
}