diff options
Diffstat (limited to 'src/channel/routes.rs')
| -rw-r--r-- | src/channel/routes.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/channel/routes.rs b/src/channel/routes.rs index bb6cde6..f524e62 100644 --- a/src/channel/routes.rs +++ b/src/channel/routes.rs @@ -10,7 +10,7 @@ use super::app; use crate::{ app::App, clock::RequestedAt, - error::InternalError, + error::Internal, events::app::EventsError, repo::{ channel::{self, Channel}, @@ -28,7 +28,7 @@ pub fn router() -> Router<App> { .route("/api/channels/:channel", post(on_send)) } -async fn list(State(app): State<App>, _: Login) -> Result<Channels, InternalError> { +async fn list(State(app): State<App>, _: Login) -> Result<Channels, Internal> { let channels = app.channels().all().await?; let response = Channels(channels); @@ -73,7 +73,7 @@ impl IntoResponse for CreateError { duplicate @ app::CreateError::DuplicateName(_) => { (StatusCode::BAD_REQUEST, duplicate.to_string()).into_response() } - other => InternalError::from(other).into_response(), + other => Internal::from(other).into_response(), } } } @@ -109,7 +109,7 @@ impl IntoResponse for ErrorResponse { not_found @ EventsError::ChannelNotFound(_) => { (StatusCode::NOT_FOUND, not_found.to_string()).into_response() } - other => InternalError::from(other).into_response(), + other => Internal::from(other).into_response(), } } } |
