2021-09-30 11:12:24 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Import::UrlController < ApplicationController
|
|
|
|
feature_category :importers
|
2022-04-27 14:10:15 -04:00
|
|
|
urgency :low
|
2021-09-30 11:12:24 -04:00
|
|
|
|
|
|
|
def validate
|
|
|
|
result = Import::ValidateRemoteGitEndpointService.new(validate_params).execute
|
|
|
|
if result.success?
|
|
|
|
render json: { success: true }
|
|
|
|
else
|
|
|
|
render json: { success: false, message: result.message }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def validate_params
|
|
|
|
params.permit(:user, :password, :url)
|
|
|
|
end
|
|
|
|
end
|