Skip to content

Commit

Permalink
Merge pull request #42 from epochtalk/update-versions-2
Browse files Browse the repository at this point in the history
Update versions 2
  • Loading branch information
akinsey authored Apr 28, 2023
2 parents 979c09d + 08e53a5 commit a9cb354
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 55 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
elixir: ['1.14.0']
otp: ['25.0.4']
elixir: ['1.14.4']
otp: ['25.3.1']
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
Expand All @@ -27,7 +27,7 @@ jobs:
with:
ref: ${{ github.event.client_payload.branch }}
- name: Sets up an Erlang/OTP environment
uses: erlef/setup-beam@v1.14.0
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
Expand All @@ -51,8 +51,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
elixir: ['1.14.0']
otp: ['25.0.4']
elixir: ['1.14.4']
otp: ['25.3.1']
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
Expand All @@ -63,7 +63,7 @@ jobs:
with:
ref: ${{ github.event.client_payload.branch }}
- name: Sets up an Erlang/OTP environment
uses: erlef/setup-beam@v1.14.0
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
Expand Down Expand Up @@ -113,8 +113,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
elixir: ['1.14.0']
otp: ['25.0.4']
elixir: ['1.14.4']
otp: ['25.3.1']
services:
postgres:
image: postgres:14.2
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
with:
ref: ${{ github.event.client_payload.branch }}
- name: Sets up an Erlang/OTP environment
uses: erlef/setup-beam@v1.14.0
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
Expand Down Expand Up @@ -208,13 +208,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
elixir: ['1.14.0']
otp: ['25.0.4']
elixir: ['1.14.4']
otp: ['25.3.1']
steps:
- name: Checkout
uses: actions/[email protected]
- name: Sets up an Erlang/OTP environment
uses: erlef/setup-beam@v1.14.0
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.14.0-rc.1-otp-25
erlang 25.0.4
elixir 1.14.4-otp-25
erlang 25.3.1
1 change: 1 addition & 0 deletions lib/epochtalk_server/models/role.ex
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ defmodule EpochtalkServer.Models.Role do
query =
from ru in RoleUser,
join: r in Role,
on: true,
where: ru.user_id == ^user_id and r.id == ru.role_id,
select: r,
order_by: [asc: r.priority]
Expand Down
14 changes: 9 additions & 5 deletions lib/epochtalk_server/models/thread.ex
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ defmodule EpochtalkServer.Models.Thread do
^opts[:user_id],
tlist.id,
tlist.id
)
),
on: true
)
# join thread title and author info
|> join(
Expand All @@ -379,7 +380,8 @@ defmodule EpochtalkServer.Models.Thread do
LIMIT 1
""",
tlist.id
)
),
on: true
)
# join post id and post position
|> join(
Expand All @@ -395,7 +397,8 @@ defmodule EpochtalkServer.Models.Thread do
""",
tlist.id,
t.time
)
),
on: true
)
# join last post info
|> join(
Expand All @@ -413,7 +416,8 @@ defmodule EpochtalkServer.Models.Thread do
LIMIT 1
""",
tlist.id
)
),
on: true
)
|> select([tlist, t, p, tv, pl], %{
id: tlist.id,
Expand Down Expand Up @@ -445,7 +449,7 @@ defmodule EpochtalkServer.Models.Thread do
|> order_by([tlist], [{^sort_order, field(tlist, ^field)}])
end

defp handle_create_poll(thread_id, nil), do: nil
defp handle_create_poll(_thread_id, nil), do: nil

defp handle_create_poll(thread_id, poll_attrs) when is_map(poll_attrs) do
# append thread_id
Expand Down
17 changes: 9 additions & 8 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,27 @@ defmodule EpochtalkServer.MixProject do
# Type `mix help deps` for examples and options.
defp deps do
[
{:argon2_elixir, "~> 3.0.0"},
{:corsica, "~> 1.2.0"},
{:argon2_elixir, "~> 3.1.0"},
{:corsica, "~> 1.3.0"},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.2", only: [:dev], runtime: false},
{:ecto_sql, "~> 3.6"},
{:ex_doc, "~> 0.28.5"},
{:ex_doc, "~> 0.29.4"},
{:gen_smtp, "~> 1.2"},
{:guardian, "~> 2.2"},
{:guardian_phoenix, "~> 2.0"},
{:guardian_db, "~> 2.1"},
{:guardian_redis, "~> 0.1"},
{:iteraptor, git: "https://github.com/epochtalk/elixir-iteraptor.git", tag: "1.13.1"},
{:jason, "~> 1.3.0"},
{:phoenix, "~> 1.6.11"},
{:jason, "~> 1.4.0"},
{:phoenix, "~> 1.7.2"},
{:phoenix_ecto, "~> 4.4"},
{:phoenix_html, "~> 3.0"},
{:phoenix_view, "~> 2.0"},
{:plug_cowboy, "~> 2.5"},
{:postgrex, ">= 0.0.0"},
{:redix, "~> 1.1.5"},
{:remote_ip, "~> 1.0.0"},
{:postgrex, "~> 0.17.1"},
{:redix, "~> 1.2.2"},
{:remote_ip, "~> 1.1.0"},
{:swoosh, "~> 1.8"},
{:telemetry_metrics, "~> 0.6"},
{:telemetry_poller, "~> 1.0"}
Expand Down
Loading

0 comments on commit a9cb354

Please sign in to comment.