Skip to content

Commit 90e123a

Browse files
authored
Remove console log and allow admins to be supporters (#91)
1 parent 47cb0cb commit 90e123a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

app/controllers/settings_controller.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ def patreon_callback
178178
token_payload = exchange_patreon_code_for_token(code)
179179
identity_payload = fetch_patreon_identity(token_payload.fetch("access_token"))
180180

181-
puts "Patreon identity payload: #{identity_payload.inspect}"
182-
183181
patreon_user_id = identity_payload.dig("data", "id").to_s
184182
if patreon_user_id.blank?
185183
redirect_to settings_path, alert: "Failed to retrieve Patreon user ID"
@@ -204,7 +202,7 @@ def patreon_callback
204202
last_synced_at: Time.current
205203
)
206204

207-
current_user.update!(is_supporter: true) if patron_status == "active_patron" && current_user.user?
205+
current_user.update!(is_supporter: true) if patron_status == "active_patron"
208206
end
209207

210208
redirect_to settings_path, notice: "Patreon account connected successfully"

0 commit comments

Comments
 (0)