mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-25 02:41:27 +01:00
refactor: additional responsibilities to middleware, simplified handlers
fix
This commit is contained in:
@@ -2,7 +2,11 @@
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use chrono::Utc;
|
||||
use common::storage::{db::SurrealDbClient, types::user::User, types::StoredObject};
|
||||
use common::storage::{
|
||||
db::SurrealDbClient,
|
||||
types::user::{Theme, User},
|
||||
types::StoredObject,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
use tracing::{info, warn};
|
||||
|
||||
@@ -212,7 +216,7 @@ pub(crate) async fn ensure_eval_user(db: &SurrealDbClient) -> Result<User> {
|
||||
api_key: None,
|
||||
admin: false,
|
||||
timezone: "UTC".to_string(),
|
||||
theme: "system".to_string(),
|
||||
theme: Theme::System,
|
||||
};
|
||||
|
||||
if let Some(existing) = db.get_item::<User>(user.get_id()).await? {
|
||||
|
||||
Reference in New Issue
Block a user