From ece62b9eb3e2f3995715c32608f1de91d98a22be Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 29 Nov 2023 23:20:31 -0500 Subject: Rails engine no longer needed --- rails/app/controllers/concerns/.keep | 0 .../controllers/lingo/application_controller.rb | 5 ----- rails/app/controllers/lingo/scores_controller.rb | 25 ---------------------- 3 files changed, 30 deletions(-) delete mode 100644 rails/app/controllers/concerns/.keep delete mode 100644 rails/app/controllers/lingo/application_controller.rb delete mode 100644 rails/app/controllers/lingo/scores_controller.rb (limited to 'rails/app/controllers') diff --git a/rails/app/controllers/concerns/.keep b/rails/app/controllers/concerns/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/rails/app/controllers/lingo/application_controller.rb b/rails/app/controllers/lingo/application_controller.rb deleted file mode 100644 index 08b728f..0000000 --- a/rails/app/controllers/lingo/application_controller.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Lingo - class ApplicationController < ActionController::Base - protect_from_forgery with: :exception - end -end diff --git a/rails/app/controllers/lingo/scores_controller.rb b/rails/app/controllers/lingo/scores_controller.rb deleted file mode 100644 index 59bbd9d..0000000 --- a/rails/app/controllers/lingo/scores_controller.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Lingo - class ScoresController < ApplicationController - skip_before_action :verify_authenticity_token, only: [:update] - - def index - @scores = Score.order(score: :desc) - end - - def update - if params[:secret_code] != Lingo.secret_code then - head :unauthorized - else - score = Score.find_or_create_by(user_id: params[:user_id]) do |score| - score.score = 0 - end - score.username = params[:username] - score.avatar_url = CGI.unescape(params[:avatar_url]) - score.score += 1 - score.save! - - head :created - end - end - end -end -- cgit 1.4.1