Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions app/controllers/test_utilities_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ class TestUtilitiesController < ApplicationController
ALLOWED_HOSTS = ['test-editor-api.raspberrypi.org', 'localhost'].freeze

def reseed
# rubocop:disable Rails/Output
pp 'api_key_valid?', api_key_valid?
pp 'api_key_present?', ENV['RESEED_API_KEY'].present?
pp 'api_key_correct?', request.headers['X-RESEED-API-KEY'] == ENV['RESEED_API_KEY']
pp 'host_allowed?', host_allowed?
pp 'host', request.host
# rubocop:enable Rails/Output

if reseed_allowed?
Rails.application.load_tasks
Rake::Task['test_seeds:destroy'].invoke
Expand Down