Fix 500 callback YouTube: pagina token senza layout admin.
Il layout admin richiedeva admin_logged_in? non disponibile nel callback OAuth. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
# Callback OAuth YouTube (HTML). Non usare Api::V1 — ActionController::API non renderizza le view.
|
||||
class YoutubeOauthCallbackController < ActionController::Base
|
||||
layout "admin"
|
||||
|
||||
def show
|
||||
return redirect_to_oauth_error("Codice OAuth mancante") if params[:code].blank?
|
||||
|
||||
@@ -11,7 +9,7 @@ class YoutubeOauthCallbackController < ActionController::Base
|
||||
if ctx[:kind] == :platform
|
||||
@refresh_token = tokens[:refresh_token]
|
||||
@channel_title = tokens[:channel_title]
|
||||
return render "admin/youtube/platform_token"
|
||||
return render "admin/youtube/platform_token", layout: false
|
||||
end
|
||||
|
||||
user = User.find(ctx[:user_id])
|
||||
|
||||
Reference in New Issue
Block a user