app/controllers/v1/spin_candidates_controller.rb
###
# Refresh
# Authenticated only
# Refresh the list of providers for the user.
# Connects to github, gets all repos of the user, and search for spins
#
Refresh
Authenticated only
Refresh the list of providers for the user.
Connects to github, gets all repos of the user, and search for spins
Refresh Authenticated only Refresh the list of providers for the user . Connects to github gets all repos of the user and search for spins
def refresh
      user = current_user.admin? ? User.find(params[:user_id]) : current_user
      if user.nil?
        render json: { error: 'No user found' }, status: :not_found
        return
      end
      job = RefreshSpinCandidatesJob.perform_later(user: user, token: request.headers['HTTP_X_USER_TOKEN'])
      render json: { data: job.job_id, metadata: { queue: job.queue_name, priority: job.priority } }, status: :accepted
    end
def refresh user = current_user . admin? ? User . find ( params [ :user_id ] ) : current_user if user . nil? render json : { error : 'No user found' } , status : :not_found return end job = RefreshSpinCandidatesJob . perform_later ( user : user , token : request . headers [ 'HTTP_X_USER_TOKEN' ] ) render json : { data : job . job_id , metadata : { queue : job . queue_name , priority : job . priority } } , status : :accepted end
Refresh
Authenticated only
Refresh the list of providers for the user.
Refresh Authenticated only Refresh the list of providers for the user .