Skip to content

Commit

Permalink
reports: update db tables, combine api impl
Browse files Browse the repository at this point in the history
  • Loading branch information
eiknat authored and eiknat committed Nov 11, 2020
1 parent 6d43202 commit d6b1c8d
Show file tree
Hide file tree
Showing 14 changed files with 428 additions and 550 deletions.
3 changes: 0 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 10 additions & 17 deletions lemmy_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,6 @@ pub async fn match_websocket_operation(
do_websocket_operation::<CreatePostLike>(context, id, op, data).await
}
UserOperation::SavePost => do_websocket_operation::<SavePost>(context, id, op, data).await,
UserOperation::CreatePostReport => {
do_websocket_operation::<CreatePostReport>(context, id, op, data).await
}
UserOperation::ListPostReports => {
do_websocket_operation::<ListPostReports>(context, id, op, data).await
}
UserOperation::ResolvePostReport => {
do_websocket_operation::<ResolvePostReport>(context, id, op, data).await
}

// Comment ops
UserOperation::CreateComment => {
Expand All @@ -302,14 +293,16 @@ pub async fn match_websocket_operation(
UserOperation::CreateCommentLike => {
do_websocket_operation::<CreateCommentLike>(context, id, op, data).await
}
UserOperation::CreateCommentReport => {
do_websocket_operation::<CreateCommentReport>(context, id, op, data).await
},
UserOperation::ListCommentReports => {
do_websocket_operation::<ListCommentReports>(context, id, op, data).await
},
UserOperation::ResolveCommentReport => {
do_websocket_operation::<ResolveCommentReport>(context, id, op, data).await

// report ops
UserOperation::CreateReport => {
do_websocket_operation::<CreateReport>(context, id, op, data).await
}
UserOperation::ListReports => {
do_websocket_operation::<ListReports>(context, id, op, data).await
}
UserOperation::ResolveReport => {
do_websocket_operation::<ResolveReport>(context, id, op, data).await
}
UserOperation::GetReportCount => {
do_websocket_operation::<GetReportCount>(context, id, op, data).await
Expand Down
Loading

0 comments on commit d6b1c8d

Please sign in to comment.