Skip to content

Commit

Permalink
chore: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Mar 7, 2024
1 parent 1aa8868 commit 368fc7c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
18 changes: 8 additions & 10 deletions crates/api_apub/src/users/user_followers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,14 @@ pub async fn handler(
let total = follower_pages.num_items_and_pages().await?;

match pagination.page {
None => {
Ok(FederationJson(WithContext::new_default(
serde_json::to_value(Collection::new(
&hatsu_utils::url::generate_user_url(data.domain(), &name)?
.join(&format!("{name}/followers"))?,
total.number_of_items,
Some(total.number_of_pages),
)?)?,
)))
},
None => Ok(FederationJson(WithContext::new_default(
serde_json::to_value(Collection::new(
&hatsu_utils::url::generate_user_url(data.domain(), &name)?
.join(&format!("{name}/followers"))?,
total.number_of_items,
Some(total.number_of_pages),
)?)?,
))),
Some(page) =>
if page > 1 && page > total.number_of_pages {
Err(AppError::not_found(
Expand Down
10 changes: 9 additions & 1 deletion crates/apub/src/actors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,12 @@ mod service;

pub use db_user::ApubUser;
pub use db_user_feed_item::{ApubUserFeedItem, JsonUserFeed, JsonUserFeedHatsu, JsonUserFeedItem};
pub use service::{PublicKeySchema, Service, ServiceAttachment, ServiceImage, ServiceTag, ServiceTagEmoji, ServiceTagEmojiIcon};
pub use service::{
PublicKeySchema,
Service,
ServiceAttachment,
ServiceImage,
ServiceTag,
ServiceTagEmoji,
ServiceTagEmojiIcon,
};

0 comments on commit 368fc7c

Please sign in to comment.