mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-11-28 20:41:33 +00:00
Bump deps
This commit is contained in:
parent
74c4a4faec
commit
f5d7c80d2e
3 changed files with 414 additions and 287 deletions
679
Cargo.lock
generated
679
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -60,7 +60,7 @@ tracing-subscriber = { version = "0.3", features = [
|
|||
"env-filter",
|
||||
"fmt",
|
||||
] }
|
||||
uuid = { version = "0.8", features = ["v4", "serde"] }
|
||||
uuid = { version = "1", features = ["v4", "serde"] }
|
||||
|
||||
[dependencies.background-jobs]
|
||||
version = "0.12.0"
|
||||
|
@ -73,7 +73,7 @@ default-features = false
|
|||
features = ["client", "server", "sha-2"]
|
||||
|
||||
[dependencies.tracing-actix-web]
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
|
||||
[build-dependencies]
|
||||
anyhow = "1.0"
|
||||
|
|
|
@ -233,32 +233,32 @@ impl Config {
|
|||
fn do_generate_url(&self, kind: UrlKind) -> Result<IriString, Error> {
|
||||
let iri = match kind {
|
||||
UrlKind::Activity => FixedBaseResolver::new(self.base_uri.as_ref())
|
||||
.resolve(IriRelativeStr::new(&format!("activity/{}", Uuid::new_v4()))?.as_ref())?,
|
||||
.try_resolve(IriRelativeStr::new(&format!("activity/{}", Uuid::new_v4()))?.as_ref())?,
|
||||
UrlKind::Actor => FixedBaseResolver::new(self.base_uri.as_ref())
|
||||
.resolve(IriRelativeStr::new("actor")?.as_ref())?,
|
||||
.try_resolve(IriRelativeStr::new("actor")?.as_ref())?,
|
||||
UrlKind::Followers => FixedBaseResolver::new(self.base_uri.as_ref())
|
||||
.resolve(IriRelativeStr::new("followers")?.as_ref())?,
|
||||
.try_resolve(IriRelativeStr::new("followers")?.as_ref())?,
|
||||
UrlKind::Following => FixedBaseResolver::new(self.base_uri.as_ref())
|
||||
.resolve(IriRelativeStr::new("following")?.as_ref())?,
|
||||
.try_resolve(IriRelativeStr::new("following")?.as_ref())?,
|
||||
UrlKind::Inbox => FixedBaseResolver::new(self.base_uri.as_ref())
|
||||
.resolve(IriRelativeStr::new("inbox")?.as_ref())?,
|
||||
.try_resolve(IriRelativeStr::new("inbox")?.as_ref())?,
|
||||
UrlKind::Index => self.base_uri.clone().into(),
|
||||
UrlKind::MainKey => {
|
||||
let actor = IriRelativeStr::new("actor")?;
|
||||
let fragment = IriFragmentStr::new("main-key")?;
|
||||
|
||||
let mut resolved =
|
||||
FixedBaseResolver::new(self.base_uri.as_ref()).resolve(actor.as_ref())?;
|
||||
FixedBaseResolver::new(self.base_uri.as_ref()).try_resolve(actor.as_ref())?;
|
||||
|
||||
resolved.set_fragment(Some(fragment));
|
||||
resolved
|
||||
}
|
||||
UrlKind::Media(uuid) => FixedBaseResolver::new(self.base_uri.as_ref())
|
||||
.resolve(IriRelativeStr::new(&format!("media/{}", uuid))?.as_ref())?,
|
||||
.try_resolve(IriRelativeStr::new(&format!("media/{}", uuid))?.as_ref())?,
|
||||
UrlKind::NodeInfo => FixedBaseResolver::new(self.base_uri.as_ref())
|
||||
.resolve(IriRelativeStr::new("nodeinfo/2.0.json")?.as_ref())?,
|
||||
.try_resolve(IriRelativeStr::new("nodeinfo/2.0.json")?.as_ref())?,
|
||||
UrlKind::Outbox => FixedBaseResolver::new(self.base_uri.as_ref())
|
||||
.resolve(IriRelativeStr::new("outbox")?.as_ref())?,
|
||||
.try_resolve(IriRelativeStr::new("outbox")?.as_ref())?,
|
||||
};
|
||||
|
||||
Ok(iri)
|
||||
|
|
Loading…
Reference in a new issue