X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a8640d48a96b0e74a16fac854ebaebeba8530653..6cd694431ed325ce2013e9732b640234610271cc:/app/controllers/api/traces_controller.rb?ds=sidebyside 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