mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 11:21:32 +00:00
parent
0a8d1f8caf
commit
96ed8bf2e9
1 changed files with 4 additions and 4 deletions
|
@ -41,19 +41,19 @@ async fn convert_response(
|
||||||
match object {
|
match object {
|
||||||
Person(p) => {
|
Person(p) => {
|
||||||
removed_or_deleted = p.deleted;
|
removed_or_deleted = p.deleted;
|
||||||
res.person = Some(PersonView::read(conn, p.id).await?)
|
res.person = Some(PersonView::read(&mut *conn, p.id).await?)
|
||||||
}
|
}
|
||||||
Community(c) => {
|
Community(c) => {
|
||||||
removed_or_deleted = c.deleted || c.removed;
|
removed_or_deleted = c.deleted || c.removed;
|
||||||
res.community = Some(CommunityView::read(conn, c.id, Some(user_id), None).await?)
|
res.community = Some(CommunityView::read(&mut *conn, c.id, Some(user_id), None).await?)
|
||||||
}
|
}
|
||||||
Post(p) => {
|
Post(p) => {
|
||||||
removed_or_deleted = p.deleted || p.removed;
|
removed_or_deleted = p.deleted || p.removed;
|
||||||
res.post = Some(PostView::read(conn, p.id, Some(user_id), None).await?)
|
res.post = Some(PostView::read(&mut *conn, p.id, Some(user_id), None).await?)
|
||||||
}
|
}
|
||||||
Comment(c) => {
|
Comment(c) => {
|
||||||
removed_or_deleted = c.deleted || c.removed;
|
removed_or_deleted = c.deleted || c.removed;
|
||||||
res.comment = Some(CommentView::read(conn, c.id, Some(user_id)).await?)
|
res.comment = Some(CommentView::read(&mut *conn, c.id, Some(user_id)).await?)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// if the object was deleted from database, dont return it
|
// if the object was deleted from database, dont return it
|
||||||
|
|
Loading…
Reference in a new issue