Files
ubicloud/routes/project/location.rb
Jeremy Evans d4bb9e8619 Allow access to objects in internal locations in web/api routes
However, do not allow creation of objects in internal locations
in web/api routes.

Show helpful error message if using an invalid location in the api.
This error message shows what the problem is, and the available
valid locations the user can use.
2025-03-25 11:48:42 -07:00

11 lines
300 B
Ruby

# frozen_string_literal: true
class Clover
hash_branch(:project_prefix, "location") do |r|
r.on String do |location_display_name|
handle_invalid_location unless (@location = Location[display_name: location_display_name])
r.hash_branches(:project_location_prefix)
end
end
end