forked from AkkomaGang/akkoma
parent
40ca379357
commit
0f099dac67
2 changed files with 11 additions and 4 deletions
lib/pleroma/web
|
@ -583,6 +583,12 @@ def login_post(conn, %{"authorization" => %{ "name" => name, "password" => passw
|
|||
end
|
||||
end
|
||||
|
||||
def logout(conn, _) do
|
||||
conn
|
||||
|> clear_session
|
||||
|> redirect(to: "/")
|
||||
end
|
||||
|
||||
def relationship_noop(%{assigns: %{user: user}} = conn, %{"id" => id}) do
|
||||
Logger.debug("Unimplemented, returning unmodified relationship")
|
||||
with %User{} = target <- Repo.get(User, id) do
|
||||
|
|
|
@ -223,12 +223,13 @@ def user_fetcher(username) do
|
|||
get "/webfinger", WebFinger.WebFingerController, :webfinger
|
||||
end
|
||||
|
||||
scope "/web", Pleroma.Web.MastodonAPI do
|
||||
scope "/", Pleroma.Web.MastodonAPI do
|
||||
pipe_through :mastodon_html
|
||||
|
||||
get "/login", MastodonAPIController, :login
|
||||
post "/login", MastodonAPIController, :login_post
|
||||
get "/*path", MastodonAPIController, :index
|
||||
get "/web/login", MastodonAPIController, :login
|
||||
post "/web/login", MastodonAPIController, :login_post
|
||||
get "/web/*path", MastodonAPIController, :index
|
||||
delete "/auth/sign_out", MastodonAPIController, :logout
|
||||
end
|
||||
|
||||
scope "/", Fallback do
|
||||
|
|
Loading…
Reference in a new issue