X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/22946d703a1186d0ec7fb18a663f73855bb49546..1700c23dd1018b66a268b4c76fcf9fb2a09a35ab:/app/controllers/api/traces_controller.rb diff --git a/app/controllers/api/traces_controller.rb b/app/controllers/api/traces_controller.rb index 07b6208af..b66aead38 100644 --- a/app/controllers/api/traces_controller.rb +++ b/app/controllers/api/traces_controller.rb @@ -2,7 +2,6 @@ module Api class TracesController < ApiController before_action :check_database_readable, :except => [:show, :data] before_action :check_database_writable, :only => [:create, :update, :destroy] - before_action :authorize_web before_action :set_locale before_action :authorize @@ -116,7 +115,7 @@ module Api trace.save! # Finally save the user's preferred privacy level - if pref = current_user.preferences.where(:k => "gps.trace.visibility").first + if pref = current_user.preferences.find_by(:k => "gps.trace.visibility") pref.v = visibility pref.save else