@Rub21 commented on this pull request.


> @@ -103,6 +103,9 @@ def edit
   def create
     @title = t ".upload_trace"
 
+    # New traces can only be trackable or identifiable.
+    return head :bad_request unless %w[trackable 
identifiable].include?(params[:trace][:visibility])

Good idea and best, I moved it to Trace.valid_visibility? and used it in the 
web and the API controller.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7146#discussion_r3405670486
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/7146/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to