about summary refs log tree commit diff
path: root/app/controllers/api/base_controller.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-11 03:21:52 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-11 03:21:52 -0600
commit4c84b6dcad0a3d432ee36e66b878bcd4a658bfa2 (patch)
tree78ef8f85be56e4b011923ad2f1f8c07605552165 /app/controllers/api/base_controller.rb
parent6ab6b6dd29c1f8fd9cd2d4371f664ed4432b1d19 (diff)
move `monsterpit_api` helper to the application controller
Diffstat (limited to 'app/controllers/api/base_controller.rb')
-rw-r--r--app/controllers/api/base_controller.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb
index 9e2efc938..eca558f42 100644
--- a/app/controllers/api/base_controller.rb
+++ b/app/controllers/api/base_controller.rb
@@ -94,20 +94,4 @@ class Api::BaseController < ApplicationController
   def set_cache_headers
     response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
   end
-
-  def monsterfork_api
-    @monsterfork_api ||= _monsterfork_api
-  end
-
-  private
-
-  def _monsterfork_api
-    return :basic if current_user.nil?
-    return current_user.monsterfork_api.to_sym unless doorkeeper_token && doorkeeper_token.application.present?
-    app = doorkeeper_token.application.name.downcase.strip.gsub(/ +/, '_').gsub(/[^\w.-]/, '')
-    return :vanilla if ENV.fetch('MONSTERFORK_API_FORCE_VANILLA', '').downcase.split.include?(app)
-    return :basic if ENV.fetch('MONSTERFORK_API_FORCE_BASIC', '').downcase.split.include?(app)
-    return :full if ENV.fetch('MONSTERFORK_API_FORCE_FULL', '').downcase.split.include?(app)
-    current_user.monsterfork_api.to_sym
-  end
 end