Skip to content

Commit

Permalink
fix(smf_query): Fixing naming errors with new smf_members join
Browse files Browse the repository at this point in the history
  • Loading branch information
crod951 committed Jan 9, 2025
1 parent b844af8 commit 78d83b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/epochtalk_server/smf_query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ defmodule EpochtalkServer.SmfQuery do
)
|> join(:left, [t], f in "smf_messages", on: t.id_first_msg == f.id_msg)
|> join(:left, [t, f], l in "smf_messages", on: t.id_last_msg == l.id_msg)
|> join(:left, [t, f, l], m in "smf_members", on: l.id_member == m.id_member)
|> join(:left, [t, f, l, m], b in "smf_boards", on: t.id_board == b.id_board)
|> select([t, f, l, m, b], %{
|> join(:left, [t, f, l], lm in "smf_members", on: l.id_member == lm.id_member)
|> join(:left, [t, f, l, lm], b in "smf_boards", on: t.id_board == b.id_board)
|> select([t, f, l, lm, b], %{
id: t.id_topic,
slug: t.id_topic,
board_id: t.id_board,
Expand All @@ -133,7 +133,7 @@ defmodule EpochtalkServer.SmfQuery do
updated_at: l.posterTime * @ms_per_sec,
last_post_created_at: l.posterTime * @ms_per_sec,
last_post_user_id: l.id_member,
last_post_username: m.realName,
last_post_username: lm.realName,
view_count: t.numViews,
last_post_position: nil,
last_post_deleted: false,
Expand Down Expand Up @@ -452,7 +452,7 @@ defmodule EpochtalkServer.SmfQuery do
title: m.subject,
body: m.body,
updated_at: m.modifiedTime,
username: m.realName,
username: u.realName,
created_at: m.posterTime * @ms_per_sec,
modified_time: m.modifiedTime,
avatar:
Expand All @@ -464,7 +464,7 @@ defmodule EpochtalkServer.SmfQuery do
),
user: %{
id: m.id_member,
username: m.realName,
username: u.realName,
signature: u.signature,
activity: u.activity,
merit: u.merit,
Expand Down

0 comments on commit 78d83b2

Please sign in to comment.