-use lemmy_db::{
- aggregates::site_aggregates::SiteAggregates,
- views::{
- comment_view::CommentView,
- community::community_view::CommunityView,
- moderator::{
- mod_add_community_view::ModAddCommunityView,
- mod_add_view::ModAddView,
- mod_ban_from_community_view::ModBanFromCommunityView,
- mod_ban_view::ModBanView,
- mod_lock_post_view::ModLockPostView,
- mod_remove_comment_view::ModRemoveCommentView,
- mod_remove_community_view::ModRemoveCommunityView,
- mod_remove_post_view::ModRemovePostView,
- mod_sticky_post_view::ModStickyPostView,
- },
- post_view::PostView,
- site_view::SiteView,
- user_view::UserViewSafe,
+use lemmy_db::views::{
+ comment_view::CommentView,
+ community::community_view::CommunityView,
+ moderator::{
+ mod_add_community_view::ModAddCommunityView,
+ mod_add_view::ModAddView,
+ mod_ban_from_community_view::ModBanFromCommunityView,
+ mod_ban_view::ModBanView,
+ mod_lock_post_view::ModLockPostView,
+ mod_remove_comment_view::ModRemoveCommentView,
+ mod_remove_community_view::ModRemoveCommunityView,
+ mod_remove_post_view::ModRemovePostView,
+ mod_sticky_post_view::ModStickyPostView,
},
+ post_view::PostView,
+ site_view::SiteView,
+ user_view::UserViewSafe,
};
use lemmy_db_schema::source::{category::*, user::User_};
use serde::{Deserialize, Serialize};
pub auth: Option<String>,
}
-// TODO combine siteresponse and getsiteresponse
#[derive(Serialize, Clone)]
pub struct SiteResponse {
- pub site: SiteView,
+ pub site_view: SiteView,
}
#[derive(Serialize)]
pub struct GetSiteResponse {
- pub site: Option<SiteView>, // Because the site might not be set up yet
- pub counts: SiteAggregates,
+ pub site_view: Option<SiteView>, // Because the site might not be set up yet
pub admins: Vec<UserViewSafe>,
pub banned: Vec<UserViewSafe>,
pub online: usize,