fix: me please

This commit is contained in:
aprilthepink 2024-06-27 05:44:40 +02:00
parent 02c1c4f9f8
commit 505809b117
2 changed files with 2 additions and 5 deletions

View file

@ -30,7 +30,6 @@ use tokio::signal;
use tracing::{info, instrument::WithSubscriber}; use tracing::{info, instrument::WithSubscriber};
use url::Url; use url::Url;
use crate::utils::generate_random_object_id;
use crate::{ use crate::{
activities::create_post::CreatePost, activities::create_post::CreatePost,
database::{Config, State}, database::{Config, State},

View file

@ -1,13 +1,11 @@
use url::{ParseError, Url}; use url::{ParseError, Url};
pub fn generate_object_id(domain: &str, uuid: &str) -> Result<Url, ParseError> { pub fn generate_object_id(domain: &str, uuid: &str) -> Result<Url, ParseError> {
let id: String = uuid::Uuid::new_v4().to_string(); Url::parse(&format!("https://{}/apbridge/object/{}", domain, uuid))
Url::parse(&format!("https://{}/apbridge/object/{}", domain, id))
} }
pub fn generate_user_id(domain: &str, uuid: &str) -> Result<Url, ParseError> { pub fn generate_user_id(domain: &str, uuid: &str) -> Result<Url, ParseError> {
let id: String = uuid::Uuid::new_v4().to_string(); Url::parse(&format!("https://{}/apbridge/user/{}", domain, uuid))
Url::parse(&format!("https://{}/apbridge/user/{}", domain, id))
} }
pub fn generate_random_object_id(domain: &str) -> Result<Url, ParseError> { pub fn generate_random_object_id(domain: &str) -> Result<Url, ParseError> {