Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
8adcd1e8
Commit
8adcd1e8
authored
Dec 20, 2018
by
Ivan Tashkinov
Browse files
[
#114
] Removed flash messages rendering on redirects.
parent
501ce34d
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/twitter_api/twitter_api_controller.ex
View file @
8adcd1e8
...
...
@@ -13,7 +13,6 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
require
Logger
plug
(
:only_if_public_instance
when
action
in
[
:public_timeline
,
:public_and_external_timeline
])
plug
(
:fetch_flash
when
action
in
[
:confirm_email
,
:resend_confirmation_email
])
action_fallback
(
:errors
)
def
verify_credentials
(%{
assigns:
%{
user:
user
}}
=
conn
,
_params
)
do
...
...
@@ -390,7 +389,6 @@ def confirm_email(conn, %{"token" => token}) do
changeset
<-
Changeset
.
change
(
user
)
|>
Changeset
.
put_embed
(
:info
,
info_change
),
{
:ok
,
_
}
<-
User
.
update_and_set_cache
(
changeset
)
do
conn
|>
put_flash
(
:info
,
"Email confirmed. Please sign in."
)
|>
redirect
(
to:
"/"
)
end
end
...
...
@@ -401,7 +399,6 @@ def resend_confirmation_email(conn, params) do
with
%
User
{}
=
user
<-
User
.
get_by_nickname_or_email
(
nickname_or_email
),
{
:ok
,
_
}
<-
User
.
try_send_confirmation_email
(
user
)
do
conn
|>
put_flash
(
:info
,
"Email confirmation has been sent."
)
|>
json_response
(
:no_content
,
""
)
end
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment