Raise a RoutingError for unknown foodcoop in multi_coop_installs

This gives the correct error code for request to files in the root
folder (e.g. /apple-touch-icon.png), which do not exist.
This commit is contained in:
Patrick Gansterer 2017-09-23 10:17:33 +02:00
parent 0edc780ec7
commit 52dc7b1387
3 changed files with 23 additions and 15 deletions

View file

@ -159,6 +159,10 @@ class FoodsoftConfig
end
end
def allowed_foodcoop?(foodcoop)
foodcoops.include? foodcoop
end
# @return [Boolean] Whether this key may be set in the database
def allowed_key?(key)
# fast check for keys without nesting