From 620cf8fa33835c1ce1e56b1028ff6e2a6fbe0f39 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 9 Jul 2026 22:00:59 +0200 Subject: chore: Add more things --- crates/server/src/handlers/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/server/src/handlers/mod.rs') diff --git a/crates/server/src/handlers/mod.rs b/crates/server/src/handlers/mod.rs index c4332f80..e24bad14 100644 --- a/crates/server/src/handlers/mod.rs +++ b/crates/server/src/handlers/mod.rs @@ -1,13 +1,13 @@ -use crate::atuin_common::api::{ErrorResponse, IndexResponse}; +use turtle_common::api::{ErrorResponse, IndexResponse}; use axum::{Json, extract::State, http, response::IntoResponse}; use crate::router::AppState; -pub(crate) mod v0; +pub mod v0; const VERSION: &str = env!("CARGO_PKG_VERSION"); -pub(crate) async fn index(state: State) -> Json { +pub async fn index(state: State) -> Json { let homage = r#""Through the fathomless deeps of space swims the star turtle Great A'Tuin, bearing on its back the four giant elephants who carry on their shoulders the mass of the Discworld." -- Sir Terry Pratchett"#; let version = state @@ -28,12 +28,12 @@ impl IntoResponse for ErrorResponseStatus<'_> { } } -pub(crate) struct ErrorResponseStatus<'a> { - pub(crate) error: ErrorResponse<'a>, - pub(crate) status: http::StatusCode, +pub struct ErrorResponseStatus<'a> { + pub error: ErrorResponse<'a>, + pub status: http::StatusCode, } -pub(crate) trait RespExt<'a> { +pub trait RespExt<'a> { fn with_status(self, status: http::StatusCode) -> ErrorResponseStatus<'a>; fn reply(reason: &'a str) -> Self; } -- cgit v1.3.1