X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/041059690882d6420fd8bd087bb28e5cb2ea9123..6312e37f6b457ee256cea19170719f1e4058c482:/app/controllers/api/traces_controller.rb diff --git a/app/controllers/api/traces_controller.rb b/app/controllers/api/traces_controller.rb index aa8a06000..8121764a1 100644 --- a/app/controllers/api/traces_controller.rb +++ b/app/controllers/api/traces_controller.rb @@ -1,13 +1,13 @@ 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 authorize_resource - before_action :check_database_readable, :except => [:show, :data] - before_action :check_database_writable, :only => [:create, :update, :destroy] before_action :check_api_readable, :only => [:show, :data] before_action :check_api_writable, :only => [:create, :update, :destroy] before_action :offline_error, :only => [:create, :destroy, :data] @@ -108,7 +108,7 @@ module Api :visibility => visibility, :inserted => false, :user => current_user, - :timestamp => Time.now.getutc, + :timestamp => Time.now.utc, :file => file )