mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-25 10:52:07 +01:00
updated dependencies application wide
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use crate::storage::types::{file_info::deserialize_flexible_id, user::User, StoredObject};
|
||||
use axum::async_trait;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{error::AppError, storage::db::SurrealDbClient};
|
||||
@@ -12,7 +11,6 @@ pub struct Analytics {
|
||||
pub visitors: i64,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl StoredObject for Analytics {
|
||||
fn table_name() -> &'static str {
|
||||
"analytics"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use axum::async_trait;
|
||||
use serde::{Deserialize, Serialize};
|
||||
pub mod analytics;
|
||||
pub mod conversation;
|
||||
@@ -14,7 +13,6 @@ pub mod text_chunk;
|
||||
pub mod text_content;
|
||||
pub mod user;
|
||||
|
||||
#[async_trait]
|
||||
pub trait StoredObject: Serialize + for<'de> Deserialize<'de> {
|
||||
fn table_name() -> &'static str;
|
||||
fn get_id(&self) -> &str;
|
||||
@@ -23,7 +21,6 @@ pub trait StoredObject: Serialize + for<'de> Deserialize<'de> {
|
||||
#[macro_export]
|
||||
macro_rules! stored_object {
|
||||
($name:ident, $table:expr, {$($(#[$attr:meta])* $field:ident: $ty:ty),*}) => {
|
||||
use axum::async_trait;
|
||||
use serde::{Deserialize, Deserializer, Serialize};
|
||||
use surrealdb::sql::Thing;
|
||||
use $crate::storage::types::StoredObject;
|
||||
@@ -98,7 +95,6 @@ macro_rules! stored_object {
|
||||
$(pub $field: $ty),*
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl StoredObject for $name {
|
||||
fn table_name() -> &'static str {
|
||||
$table
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
use crate::storage::types::file_info::deserialize_flexible_id;
|
||||
use axum::async_trait;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
@@ -17,7 +16,6 @@ pub struct SystemSettings {
|
||||
pub ingestion_system_prompt: String,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl StoredObject for SystemSettings {
|
||||
fn table_name() -> &'static str {
|
||||
"system_settings"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use crate::{error::AppError, storage::db::SurrealDbClient, stored_object};
|
||||
use async_trait::async_trait;
|
||||
use axum_session_auth::Authentication;
|
||||
use surrealdb::{engine::any::Any, Surreal};
|
||||
use uuid::Uuid;
|
||||
|
||||
Reference in New Issue
Block a user