Sha256: d494451bf337d4ebb92fc3425a1a45808c8ebdfc77445c8295048e3a274c20b5

Contents?: true

Size: 347 Bytes

Versions: 22

Compression:

Stored size: 347 Bytes

Contents

Server.api :reset, :admin do |params,user|
  Store.db.flushdb
  app_klass = Object.const_get(camelize(APP_NAME))
  if app_klass.singleton_methods.map(&:to_sym).include?(:initializer)
    app_klass.send :initializer, Rhoconnect.base_directory
  end
  # restoring previous token value after flushdb
  user.token = params[:api_token]
  "DB reset"
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rhoconnect-3.2.1 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.2.0 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.2.0.beta5 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.2.0.beta4 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.2.0.beta3 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.2.0.beta2 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.2.0.beta1 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.1.2 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.1.1 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.1.0 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.1.0.beta2 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.1.0.beta1 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.0.6 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.0.5 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.0.4 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.0.3 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.0.2 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.0.1 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.0.0 lib/rhoconnect/api/admin/reset.rb
rhoconnect-3.0.0.rc1 lib/rhoconnect/api/admin/reset.rb