mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-17 09:25:50 +00:00
Adding modlog private site check.
This commit is contained in:
parent
a90d5a40d8
commit
86a4d9b112
@ -77,6 +77,12 @@ impl Perform for GetModlog {
|
||||
) -> Result<GetModlogResponse, LemmyError> {
|
||||
let data: &GetModlog = self;
|
||||
|
||||
let local_user_view =
|
||||
get_local_user_view_from_jwt_opt(data.auth.as_ref(), context.pool(), context.secret())
|
||||
.await?;
|
||||
|
||||
check_private_instance(&local_user_view, context.pool()).await?;
|
||||
|
||||
let community_id = data.community_id;
|
||||
let mod_person_id = data.mod_person_id;
|
||||
let page = data.page;
|
||||
|
@ -72,6 +72,7 @@ pub struct GetModlog {
|
||||
pub community_id: Option<CommunityId>,
|
||||
pub page: Option<i64>,
|
||||
pub limit: Option<i64>,
|
||||
pub auth: Option<Sensitive<String>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
|
Loading…
Reference in New Issue
Block a user