use basic monsterfork api for anonymous clients

master
multiple creatures 2020-01-11 02:52:31 -06:00
parent 3b1bf5b495
commit d32f0c7bcf
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ class Api::BaseController < ApplicationController
private
def _monsterfork_api
return :full if current_user.nil?
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)