mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-23 17:28:34 +02:00
wip datetime impl
This commit is contained in:
@@ -8,7 +8,7 @@ use axum::{extract::State, http::StatusCode, response::IntoResponse, Extension};
|
||||
use axum_typed_multipart::{FieldData, TryFromMultipart, TypedMultipart};
|
||||
use futures::{future::try_join_all, TryFutureExt};
|
||||
use tempfile::NamedTempFile;
|
||||
use tracing::info;
|
||||
use tracing::{debug, info};
|
||||
|
||||
#[derive(Debug, TryFromMultipart)]
|
||||
pub struct IngressParams {
|
||||
@@ -32,6 +32,8 @@ pub async fn ingress_data(
|
||||
}))
|
||||
.await?;
|
||||
|
||||
debug!("Got file infos");
|
||||
|
||||
let ingress_objects = create_ingress_objects(
|
||||
IngressInput {
|
||||
content: input.content,
|
||||
@@ -41,6 +43,7 @@ pub async fn ingress_data(
|
||||
},
|
||||
user.id.as_str(),
|
||||
)?;
|
||||
debug!("Got ingress objects");
|
||||
|
||||
let futures: Vec<_> = ingress_objects
|
||||
.into_iter()
|
||||
|
||||
@@ -37,6 +37,10 @@ pub async fn index_handler(
|
||||
false => 0,
|
||||
};
|
||||
|
||||
// let latest_text_contents = match auth.current_user.is_some() {
|
||||
// true =>
|
||||
// }
|
||||
|
||||
// let knowledge_entities = User::get_knowledge_entities(
|
||||
// &auth.current_user.clone().unwrap().id,
|
||||
// &state.surreal_db_client,
|
||||
|
||||
@@ -9,6 +9,7 @@ use axum_session_auth::AuthSession;
|
||||
use axum_session_surreal::SessionSurrealPool;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use surrealdb::{engine::any::Any, Surreal};
|
||||
use tracing::info;
|
||||
|
||||
use crate::{
|
||||
error::{AppError, HtmlError},
|
||||
@@ -63,7 +64,8 @@ pub async fn process_signup_and_show_verification(
|
||||
) -> Result<impl IntoResponse, HtmlError> {
|
||||
let user = match User::create_new(form.email, form.password, &state.surreal_db_client).await {
|
||||
Ok(user) => user,
|
||||
Err(_) => {
|
||||
Err(e) => {
|
||||
info!("{:?}", e);
|
||||
return Ok(Html("<p>User already exists</p>").into_response());
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user