forked from alemi/upub
fix: sharkey wants trailing slash too
This commit is contained in:
parent
c6628973ca
commit
b0f47de278
1 changed files with 6 additions and 5 deletions
|
@ -131,7 +131,7 @@ impl Fetcher for Context {
|
|||
|
||||
let document = Self::request(
|
||||
Method::GET, id, None,
|
||||
&format!("https://{}", self.domain()), self.pkey(), self.domain(),
|
||||
&format!("https://{}/", self.domain()), self.pkey(), self.domain(),
|
||||
)
|
||||
.await?
|
||||
.json::<serde_json::Value>()
|
||||
|
@ -207,7 +207,8 @@ impl Fetcher for Context {
|
|||
};
|
||||
|
||||
if let Ok(res) = Self::request(
|
||||
Method::GET, &format!("https://{domain}"), None, &format!("https://{}", self.domain()), self.pkey(), self.domain(),
|
||||
Method::GET, &format!("https://{domain}"), None,
|
||||
&format!("https://{}/", self.domain()), self.pkey(), self.domain(),
|
||||
).await {
|
||||
if let Ok(actor) = res.json::<serde_json::Value>().await {
|
||||
if let Some(name) = actor.name() {
|
||||
|
@ -243,7 +244,7 @@ impl Fetcher for Context {
|
|||
if let Some(followers_url) = &document.followers().id() {
|
||||
let req = Self::request(
|
||||
Method::GET, followers_url, None,
|
||||
&format!("https://{}", self.domain()), self.pkey(), self.domain(),
|
||||
&format!("https://{}/", self.domain()), self.pkey(), self.domain(),
|
||||
).await;
|
||||
if let Ok(res) = req {
|
||||
if let Ok(user_followers) = res.json::<serde_json::Value>().await {
|
||||
|
@ -257,7 +258,7 @@ impl Fetcher for Context {
|
|||
if let Some(following_url) = &document.following().id() {
|
||||
let req = Self::request(
|
||||
Method::GET, following_url, None,
|
||||
&format!("https://{}", self.domain()), self.pkey(), self.domain(),
|
||||
&format!("https://{}/", self.domain()), self.pkey(), self.domain(),
|
||||
).await;
|
||||
if let Ok(res) = req {
|
||||
if let Ok(user_following) = res.json::<serde_json::Value>().await {
|
||||
|
|
Loading…
Reference in a new issue