module Api
class ChangesetsController < ApiController
before_action :check_api_writable, :only => [:create, :update, :upload, :subscribe, :unsubscribe]
- before_action :check_api_readable, :except => [:index, :create, :update, :upload, :download, :subscribe, :unsubscribe]
before_action :setup_user_auth, :only => [:show]
before_action :authorize, :only => [:create, :update, :upload, :close, :subscribe, :unsubscribe]
changesets.where("closed_at >= ? and created_at <= ?", from, to)
else
# if there is no comma, assume its a lower limit on time
- changesets.where("closed_at >= ?", Time.parse(time).utc)
+ changesets.where(:closed_at => Time.parse(time).utc..)
end
# stupid Time seems to throw both of these for bad parsing, so
# we have to catch both and ensure the correct code path is taken.