mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Consistently use our FeatureToggle module
Direct calls to Flipper have the downside that we can't add any new functionality like storing the feature in the database when used.
This commit is contained in:
@@ -40,7 +40,7 @@ module Api
|
||||
end
|
||||
|
||||
def restrict_feature
|
||||
not_found unless Flipper.enabled?(:api_v1, @current_api_user)
|
||||
not_found unless OpenFoodNetwork::FeatureToggle.enabled?(:api_v1, @current_api_user)
|
||||
end
|
||||
|
||||
def current_ability
|
||||
|
||||
Reference in New Issue
Block a user