projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Parse correctly content-type & do not forward content-length
[akkoma]
/
lib
/
pleroma
/
plugs
/
set_user_session_id_plug.ex
1
defmodule Pleroma.Plugs.SetUserSessionIdPlug do
2
import Plug.Conn
3
alias Pleroma.User
4
5
def init(opts) do
6
opts
7
end
8
9
def call(%{assigns: %{user: %User{id: id}}} = conn, _) do
10
conn
11
|> put_session(:user_id, id)
12
end
13
14
def call(conn, _), do: conn
15
end