mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-30 22:32:07 +02:00
refactor: moved routes
This commit is contained in:
17
src/server/routes/query.rs
Normal file
17
src/server/routes/query.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use crate::storage::db::SurrealDbClient;
|
||||
use axum::{http::StatusCode, response::IntoResponse, Extension, Json};
|
||||
use serde::Deserialize;
|
||||
use std::sync::Arc;
|
||||
use tracing::{error, info};
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct QueryInput {
|
||||
query: String,
|
||||
}
|
||||
|
||||
pub async fn query_handler(
|
||||
Extension(db_client): Extension<Arc<SurrealDbClient>>,
|
||||
Json(query): Json<QueryInput>,
|
||||
) -> impl IntoResponse {
|
||||
info!("Received input: {:?}", query);
|
||||
}
|
||||
Reference in New Issue
Block a user