Merge branch 'master' of gitlab.com:mythic-insight/legendary into dependabot-docker-node-16.6.0
This commit is contained in:
commit
01219447aa
8 changed files with 11724 additions and 11658 deletions
3
.dialyzer_ignore.exs
Normal file
3
.dialyzer_ignore.exs
Normal file
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
{"lib/i18n.ex:1:pattern_match_cov The pattern pattern <_@1, _@2, _@3> can never match the type, because it is covered by previous clauses."}
|
||||
]
|
23349
apps/app/assets/package-lock.json
generated
23349
apps/app/assets/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -4,10 +4,6 @@ defmodule AppWeb.LiveHelpers do
|
|||
"""
|
||||
import Phoenix.LiveView
|
||||
|
||||
alias Legendary.Auth.User
|
||||
alias Pow.Store.CredentialsCache
|
||||
alias AppWeb.Pow.Routes
|
||||
|
||||
def assign_defaults(socket, session) do
|
||||
assign_new(socket, :current_user, fn -> get_user(socket, session) end)
|
||||
end
|
||||
|
@ -16,7 +12,7 @@ defmodule AppWeb.LiveHelpers do
|
|||
if socket.assigns.current_user do
|
||||
socket
|
||||
else
|
||||
redirect(socket, to: Routes.after_sign_out_path(%Plug.Conn{}))
|
||||
redirect(socket, to: "/")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -7,12 +7,11 @@ defmodule Legendary.Content.Application do
|
|||
# See https://hexdocs.pm/elixir/Application.html
|
||||
# for more information on OTP Applications
|
||||
def start(_type, _args) do
|
||||
import Supervisor.Spec
|
||||
|
||||
# Define workers and child supervisors to be supervised
|
||||
children = [
|
||||
# Start the Ecto repository
|
||||
supervisor(Legendary.Content.Repo, []),
|
||||
Legendary.Content.Repo,
|
||||
# Start the endpoint when the application starts
|
||||
# Start your own worker by calling: Legendary.Content.Worker.start_link(arg1, arg2, arg3)
|
||||
# worker(Legendary.Content.Worker, [arg1, arg2, arg3]),
|
||||
|
|
|
@ -24,8 +24,14 @@ defmodule AuthWeb.Pow.ControllerCallbacks do
|
|||
end
|
||||
|
||||
def before_respond(Pow.Phoenix.SessionController, :delete, {:ok, conn}, config) do
|
||||
live_socket_id = Conn.get_session(conn, :live_socket_id)
|
||||
AppWeb.Endpoint.broadcast(live_socket_id, "disconnect", %{})
|
||||
case Conn.get_session(conn, :live_socket_id) do
|
||||
nil ->
|
||||
nil
|
||||
live_socket_id ->
|
||||
%{private: %{phoenix_endpoint: endpoint}} = conn
|
||||
|
||||
apply(endpoint, :broadcast, [live_socket_id, "disconnect", %{}])
|
||||
end
|
||||
|
||||
conn =
|
||||
conn
|
||||
|
|
|
@ -18,7 +18,11 @@ defmodule Legendary.Core.SharedDBConnectionPool do
|
|||
|
||||
def child_spec({mod, opts}) do
|
||||
opts = Keyword.put_new(opts, :name, key(opts))
|
||||
Supervisor.Spec.worker(Legendary.Core.SharedDBConnectionPool, [{mod, opts}])
|
||||
|
||||
%{
|
||||
id: __MODULE__,
|
||||
start: {Legendary.Core.SharedDBConnectionPool, :start_link, [{mod, opts}]}
|
||||
}
|
||||
end
|
||||
|
||||
defp key(opts) do
|
||||
|
|
|
@ -138,6 +138,7 @@ defmodule Legendary.Core.MixProject do
|
|||
{:bamboo, "~> 1.5"},
|
||||
{:bamboo_smtp, "~> 3.0"},
|
||||
{:credo, "~> 1.4", only: [:dev, :test], runtime: false},
|
||||
{:dialyxir, "~> 1.0", only: [:dev], runtime: false},
|
||||
{:ex_cldr, "~> 2.13.0"},
|
||||
{:ex_doc, "~> 0.24", only: :dev, runtime: false},
|
||||
{:excoveralls, "~> 0.10", only: [:dev, :test]},
|
||||
|
|
4
mix.exs
4
mix.exs
|
@ -13,6 +13,10 @@ defmodule Legendary.Mixfile do
|
|||
deps: deps(),
|
||||
test_coverage: [tool: ExCoveralls],
|
||||
aliases: aliases(),
|
||||
dialyzer: [
|
||||
plt_add_apps: [:mix],
|
||||
ignore_warnings: ".dialyzer_ignore.exs"
|
||||
],
|
||||
preferred_cli_env: [
|
||||
coveralls: :test,
|
||||
"coveralls.detail": :test,
|
||||
|
|
Loading…
Reference in a new issue