class TermsOfServicesController < ApplicationController
  skip_before_action :enforce_terms_of_service_agreement!

  def update
    if params[:accepted] && current_user.update(terms_of_service_date: Time.current)
      render_success :ok
    else
      render_error :unprocessable_entity, message: 'Agreement must be accepted'
    end
  end
end
