Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature #136 track clicks on CWA button (Backend) #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/tickets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ def risk_feed
private

def ticket_params
params.require(:ticket).permit(:id, :area_id, :entered_at, :left_at, :encrypted_data, :public_key, :accepted_privacy_policy)
params.require(:ticket).permit(:id, :area_id, :entered_at, :left_at, :cwa_checked_in, :encrypted_data, :public_key, :accepted_privacy_policy)
end
end
2 changes: 1 addition & 1 deletion app/models/ticket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Ticket < ApplicationRecord
has_paper_trail on: [:update], only: [:encrypted_data]

AUTO_CHECKOUT_AFTER = 4.hours
EXPOSED_ATTRIBUTES = %i[id entered_at left_at area_id company_name company_address company_location_type company_cwa_link_enabled company_auto_checkout_time area_name]
EXPOSED_ATTRIBUTES = %i[id entered_at left_at area_id company_name cwa_checked_in company_address company_location_type company_cwa_link_enabled company_auto_checkout_time area_name]

enum status: { neutral: 0, at_risk: 2 }

Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20210614144014_add_cwa_tracking_to_tickets.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddCwaTrackingToTickets < ActiveRecord::Migration[6.1]
def change
add_column :tickets, :cwa_checked_in, :integer
end
end