mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-28 10:29:30 +02:00
feat: customizable data storage path
This commit is contained in:
@@ -39,7 +39,7 @@ pub async fn index_handler(
|
||||
auth: AuthSessionType,
|
||||
) -> Result<impl IntoResponse, HtmlError> {
|
||||
let Some(user) = auth.current_user else {
|
||||
return Ok(TemplateResponse::redirect("/"));
|
||||
return Ok(TemplateResponse::redirect("/signin"));
|
||||
};
|
||||
|
||||
let active_jobs = User::get_unfinished_ingestion_tasks(&user.id, &state.db).await?;
|
||||
|
||||
@@ -14,6 +14,7 @@ use common::{
|
||||
file_info::FileInfo, ingestion_payload::IngestionPayload, ingestion_task::IngestionTask,
|
||||
user::User,
|
||||
},
|
||||
utils::config::AppConfig,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
@@ -88,12 +89,9 @@ pub async fn process_ingress_form(
|
||||
|
||||
info!("{:?}", input);
|
||||
|
||||
let file_infos = try_join_all(
|
||||
input
|
||||
.files
|
||||
.into_iter()
|
||||
.map(|file| FileInfo::new(file, &state.db, &user.id).map_err(AppError::from)),
|
||||
)
|
||||
let file_infos = try_join_all(input.files.into_iter().map(|file| {
|
||||
FileInfo::new(file, &state.db, &user.id, &state.config).map_err(AppError::from)
|
||||
}))
|
||||
.await?;
|
||||
|
||||
let payloads = IngestionPayload::create_ingestion_payload(
|
||||
|
||||
Reference in New Issue
Block a user