Compare commits

..

2 Commits

Author SHA1 Message Date
e94282a7c2 fix redirect loop 2026-02-02 21:39:31 +01:00
974c4e6a06 remove buildpack 2026-01-11 15:35:04 +01:00
2 changed files with 4 additions and 5 deletions

View File

@@ -1 +0,0 @@
https://github.com/heroku/heroku-buildpack-ruby.git:v334

View File

@@ -2,13 +2,13 @@ class SpotifyController < ApplicationController
before_action :authenticate_user!
def index
# If already connected, redirect to dashboard
redirect_to statistics_path if current_user.logins.exists?(platform: "spotify")
# If already connected and alive, redirect to dashboard
redirect_to statistics_path if current_user.logins.alive.exists?(platform: "spotify")
end
def connect
# If user already has a login, redirect to statistics dashboard
return redirect_to statistics_path if current_user.logins.exists?(platform: "spotify")
# If user already has an alive login, redirect to statistics dashboard
return redirect_to statistics_path if current_user.logins.alive.exists?(platform: "spotify")
client_id = ENV["SPOTIFY_CLIENT_ID"]
redirect_uri = SpotifyClient::SPOTIFY_REDIRECT_URI
scope = SpotifyClient::SCOPE