add check_uuid_url to codeharbor_link

This commit is contained in:
Karol
2019-10-20 16:20:04 +02:00
parent 7e7be4721a
commit 9512fe4a79
14 changed files with 51 additions and 85 deletions

View File

@ -2,7 +2,6 @@
module ExerciseService
class PushExternal < ServiceBase
CODEHARBOR_PUSH_LINK = Rails.env.production? ? 'https://codeharbor.openhpi.de/import_exercise' : 'http://localhost:3001/import_exercise'
def initialize(zip:, codeharbor_link:)
@zip = zip
@codeharbor_link = codeharbor_link
@ -11,7 +10,7 @@ module ExerciseService
def execute
body = @zip.string
begin
conn = Faraday.new(url: CODEHARBOR_PUSH_LINK) do |faraday|
conn = Faraday.new(url: @codeharbor_link.push_url) do |faraday|
faraday.adapter Faraday.default_adapter
end