1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-07-28 10:48:30 +00:00

refactor Error::bad_config

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-12 07:41:01 +00:00
parent 93ec4e579b
commit 4cc92dd175
10 changed files with 71 additions and 66 deletions

View file

@ -3,7 +3,7 @@ use axum::{
routing::{any, get, post},
Router,
};
use conduit::{Error, Server};
use conduit::{err, Error, Server};
use http::Uri;
use ruma::api::client::error::ErrorKind;
@ -236,4 +236,4 @@ async fn initial_sync(_uri: Uri) -> impl IntoResponse {
Error::BadRequest(ErrorKind::GuestAccessForbidden, "Guest access not implemented")
}
async fn federation_disabled() -> impl IntoResponse { Error::bad_config("Federation is disabled.") }
async fn federation_disabled() -> impl IntoResponse { err!(Config("allow_federation", "Federation is disabled.")) }