mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix Rails/ApplicationController
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# Controller used to provide the API products for the DFC application
|
||||
module DfcProvider
|
||||
class BaseController < ActionController::Base
|
||||
class ApplicationController < ActionController::Base
|
||||
protect_from_forgery with: :null_session
|
||||
|
||||
rescue_from ActiveRecord::RecordNotFound, with: :not_found
|
||||
@@ -3,7 +3,7 @@
|
||||
# Controller used to provide the API products for the DFC application
|
||||
# CatalogItems are items that are being sold by the entreprise.
|
||||
module DfcProvider
|
||||
class CatalogItemsController < DfcProvider::BaseController
|
||||
class CatalogItemsController < DfcProvider::ApplicationController
|
||||
before_action :check_enterprise
|
||||
|
||||
def index
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Controller used to provide the CatalogItem API for the DFC application
|
||||
module DfcProvider
|
||||
class EnterprisesController < DfcProvider::BaseController
|
||||
class EnterprisesController < DfcProvider::ApplicationController
|
||||
before_action :check_enterprise
|
||||
|
||||
def show
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Controller used to provide the Persons API for the DFC application
|
||||
module DfcProvider
|
||||
class PersonsController < DfcProvider::BaseController
|
||||
class PersonsController < DfcProvider::ApplicationController
|
||||
before_action :check_user_accessibility
|
||||
|
||||
def show
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Controller used to provide the SuppliedProducts API for the DFC application
|
||||
# SuppliedProducts are products that are managed by an enterprise.
|
||||
module DfcProvider
|
||||
class SuppliedProductsController < DfcProvider::BaseController
|
||||
class SuppliedProductsController < DfcProvider::ApplicationController
|
||||
before_action :check_enterprise
|
||||
rescue_from JSON::LD::JsonLdError::LoadingDocumentFailed, with: -> do
|
||||
head :bad_request
|
||||
|
||||
Reference in New Issue
Block a user