class QuizResponsesController < ApplicationController
    def create
        @quiz_response = QuizResponse.new
        @quiz_response.count = params[:count]
        
        if @quiz_response.save
          render json: { status: 'success' }
        else
          render json: { status: 'error', errors: @quiz_response.errors.full_messages }
        end
      end

      def show
        @button_count = QuizResponse.sum(:count)
      end
end
