spotify web setup is done
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
class ApplicationController < ActionController::Base
|
||||
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
|
||||
allow_browser versions: :modern
|
||||
|
||||
before_action :check_spotify_login
|
||||
|
||||
private
|
||||
|
||||
def check_spotify_login
|
||||
if user_signed_in? && current_user.logins.where(platform: "spotify").none?
|
||||
unless request.path == spotify_connect_path || request.path == spotify_path || request.path == spotify_callback_path || devise_controller?
|
||||
redirect_to spotify_path
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user