Merge pull request #7041 from opf/fix/const-defined

Don't redefine API constants on every reload
pull/7045/head
ulferts 6 years ago committed by GitHub
commit 9a4c4ebf77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/api/v3/render/render_api.rb

@ -36,8 +36,8 @@ module API
resources :render do resources :render do
helpers do helpers do
SUPPORTED_CONTEXT_NAMESPACES = %w(work_packages projects news posts wiki_pages).freeze SUPPORTED_CONTEXT_NAMESPACES ||= %w(work_packages projects news posts wiki_pages).freeze
SUPPORTED_MEDIA_TYPE = 'text/plain'.freeze SUPPORTED_MEDIA_TYPE ||= 'text/plain'.freeze
def allowed_content_types def allowed_content_types
[SUPPORTED_MEDIA_TYPE] [SUPPORTED_MEDIA_TYPE]

Loading…
Cancel
Save