2021-11-18 22:05:49 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Import::UrlController < ApplicationController
|
|
|
|
feature_category :importers
|
2022-07-16 23:28:13 +05:30
|
|
|
urgency :low
|
2021-11-18 22:05:49 +05:30
|
|
|
|
|
|
|
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
|