Class: HousingMisc::LogsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- HousingMisc::LogsController
- Includes:
- ApiHelper
- Defined in:
- app/controllers/housing_misc/logs_controller.rb
Constant Summary
Constants included from ApiHelper
ApiHelper::MOBILE_REQUEST_TIME_THRESHOLD
Instance Method Summary collapse
Methods included from ApiHelper
#add_attachments, #add_base_vars, #add_global_merge_vars, #add_merge_vars, #add_user_emails, #csrf_check, #filter_parameters, #get_api_call, #get_email_template_from_mail_service, #get_past_channel_details, #get_request_attribute_value, #get_shortened_url, #internal_host_check, #is_request_csrf_valid?, #is_request_from_mobile?, #is_request_internal?, #log_invalid_csrf_request, #logging_file, #send_generic_mail, #send_generic_sms, #upload_log_to_s3
Methods inherited from ApplicationController
Methods inherited from ActionController::Base
Instance Method Details
#push_logs ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/housing_misc/logs_controller.rb', line 6 def push_logs file_name = params[:file_name] begin file_path = "#{Rails.root}/log/#{file_name}" response = upload_log_to_s3(file_path) render json: {message: "Your file has been uploaded in bucket: #{HousingMisc.bucket}"} rescue => e render json: {message: e. }, status: 422 end end |