From 65f1f543a677ccf3086480926fa435b3d6b9a5cd Mon Sep 17 00:00:00 2001 From: April John Date: Fri, 26 Jul 2024 18:01:24 +0200 Subject: [PATCH] fix --- src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index f6519b1..9ae9593 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,7 @@ use lysand::http::{create_activity, fetch_lysand_post, fetch_post, fetch_user, q use objects::person::{DbUser, Person}; use sea_orm::{ActiveModelTrait, DatabaseConnection, Set}; use serde::{Deserialize, Serialize}; +use uuid::Uuid; use std::{ collections::HashMap, env, @@ -176,10 +177,12 @@ async fn main() -> actix_web::Result<(), anyhow::Error> { dotenv().ok(); env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); + let uuid = Uuid::now_v7(); + let ap_id = Url::parse(&format!( - "https://{}/{}", + "https://{}/apbridge/user/{}", API_DOMAIN.to_string(), - &USERNAME.to_string() + &uuid.to_string() ))?; let inbox = Url::parse(&format!( "https://{}/{}/inbox", @@ -218,7 +221,7 @@ async fn main() -> actix_web::Result<(), anyhow::Error> { }; let user = entities::user::ActiveModel { - id: Set(ap_id.clone().into()), + id: Set(uuid.to_string()), username: Set(USERNAME.to_string()), name: Set("Test account <3".to_string()), inbox: Set(inbox.to_string()),