add: forum posts ui
This commit is contained in:
parent
ef029c59b3
commit
2be87c397d
90 changed files with 1459 additions and 1299 deletions
|
@ -932,7 +932,7 @@ pub async fn post_replies_request(
|
|||
None => return Json(Error::NotAllowed.into()),
|
||||
};
|
||||
|
||||
match data.get_replies_by_post(id, 12, props.page).await {
|
||||
match data.get_replies_by_post(id, 12, props.page, "DESC").await {
|
||||
Ok(posts) => {
|
||||
let ignore_users = crate::ignore_users_gen!(user!, #data);
|
||||
Json(ApiReturn {
|
||||
|
|
|
@ -835,7 +835,16 @@ pub async fn post_request(
|
|||
// ...
|
||||
let ignore_users = crate::ignore_users_gen!(user, data);
|
||||
|
||||
let feed = match data.0.get_replies_by_post(post.id, 12, props.page).await {
|
||||
let feed = match data
|
||||
.0
|
||||
.get_replies_by_post(
|
||||
post.id,
|
||||
12,
|
||||
props.page,
|
||||
if community.is_forum { "ASC" } else { "DESC" },
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(p) => match data.0.fill_posts(p, &ignore_users, &user).await {
|
||||
Ok(p) => p,
|
||||
Err(e) => return Err(Html(render_error(e, &jar, &data, &user).await)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue