mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 06:38:20 +01:00
fix: me please
This commit is contained in:
parent
02c1c4f9f8
commit
505809b117
|
|
@ -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},
|
||||||
|
|
|
||||||
|
|
@ -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> {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue