projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[#582] Optimized federation retirement by reducing the number of SQL calls
[akkoma]
/
lib
/
pleroma
/
plugs
/
user_fetcher_plug.ex
diff --git
a/lib/pleroma/plugs/user_fetcher_plug.ex
b/lib/pleroma/plugs/user_fetcher_plug.ex
index 9cbaaf40a983be5d4c76788ae25bd71d3bc5c64a..f874e2f95a3fd8fb836af99ccdbdd237abf85651 100644
(file)
--- a/
lib/pleroma/plugs/user_fetcher_plug.ex
+++ b/
lib/pleroma/plugs/user_fetcher_plug.ex
@@
-1,3
+1,7
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Plugs.UserFetcherPlug do
import Plug.Conn
alias Pleroma.Repo
defmodule Pleroma.Plugs.UserFetcherPlug do
import Plug.Conn
alias Pleroma.Repo
@@
-7,7
+11,7
@@
defmodule Pleroma.Plugs.UserFetcherPlug do
options
end
options
end
- def call(conn, options) do
+ def call(conn,
_
options) do
with %{auth_credentials: %{username: username}} <- conn.assigns,
{:ok, %User{} = user} <- user_fetcher(username) do
conn
with %{auth_credentials: %{username: username}} <- conn.assigns,
{:ok, %User{} = user} <- user_fetcher(username) do
conn