Sha256: f63f1194ad8525bc0702b983f3ac1f060ee58ff0fdd1ff0339fdb87427b48c6b
Contents?: true
Size: 683 Bytes
Versions: 12
Compression:
Stored size: 683 Bytes
Contents
class ImportsController < ApplicationController before_action :authorize def index end def create Services::Hubspot::Imports::Create.new(uploaded_file: params[:file]).call redirect_to :imports, notice: 'Import succesfully created.' end def download_example send_file 'public/examples/example.csv', type: 'application/octet-stream', status: 202 end private def authorize redirect_to login_path and return if session['tokens'].blank? session['tokens'] = Services::Authorization::Tokens::Refresh.new(tokens: session['tokens'], request: request).call Services::Authorization::AuthorizeHubspot.new(tokens: session['tokens']).call end end
Version data entries
12 entries across 12 versions & 1 rubygems