Prefer `success_Json` over custom success JSON payload.
This commit is contained in:
parent
218c8e8623
commit
96e5a7da46
|
@ -261,7 +261,7 @@ class SessionController < ApplicationController
|
|||
Jobs.enqueue(:critical_user_email, type: :forgot_password, user_id: user.id, email_token: email_token.token)
|
||||
end
|
||||
|
||||
json = { result: "ok" }
|
||||
json = success_json
|
||||
unless SiteSetting.hide_email_address_taken
|
||||
json[:user_found] = user_presence
|
||||
end
|
||||
|
|
|
@ -609,7 +609,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
json = { result: "ok" }
|
||||
json = success_json
|
||||
json[:user_found] = user_presence unless SiteSetting.hide_email_address_taken
|
||||
render json: json
|
||||
rescue RateLimiter::LimitExceeded
|
||||
|
|
Loading…
Reference in New Issue