-
-
Notifications
You must be signed in to change notification settings - Fork 860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding /post/like/list and /comment/like/list for admins. #4332
Conversation
dessalines
commented
Dec 26, 2023
- Allows admins to view likes, sorted by downvotes first, for a given comment or post.
- Fixes Make votes more transparent #4088
- Allows admins to view likes, sorted by downvotes first, for a given comment or post. - Fixes #4088
limit: Option<i64>, | ||
) -> Result<Vec<Self>, Error> { | ||
let conn = &mut get_conn(pool).await?; | ||
let (limit, offset) = limit_and_offset(page, limit)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses a default limit of 10 and maximum 50. As the vote objects are quite small and there can be lots of votes it would make sense to use higher values here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hrm... I'd rather not have a custom default just for this one specifically. The front ends can send a custom one anyway.
local_user_view: LocalUserView, | ||
) -> Result<Json<ListPostLikesResponse>, LemmyError> { | ||
// Make sure user is an admin | ||
is_admin(&local_user_view)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also make this accessible for mods so admins dont have to inspect votes on their own. I dont think its a big deal considering that Kbin even publishes all votes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be open to it, but we can bump that for a later time. Admins-only makes sense to me, both for privacy reasons, and since downvote trolls are an instance-wide problem, not community specific.