Sha256: 13662570f7995197f228fa0a88c477e2a26101cedd3411a6f55402b37a7aa61e

Contents?: true

Size: 514 Bytes

Versions: 27

Compression:

Stored size: 514 Bytes

Contents

require "grape"

module RestFtpDaemon
  module API
    class Config < Grape::API

      ### ENDPOINTS
      desc "Show daemon config"
      get "/" do
        status 200
        return get_censored_config
      end

      desc "Reload daemon config"
      post "/reload" do
        if Conf[:allow_reload]==true
          Conf.reload!
          status 200
          return get_censored_config
        else
          status 403
          return "Config reload not permitted"
        end
      end

    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.434.0 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.433.0 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.432.0 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.430.1 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.430.0 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.424.3 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.424.2 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.424.0 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.423.3 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.423.2 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.423.1 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.423.0 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.422.0 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.421.1 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.421.0 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.420.2 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.420.1 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.410.5 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.410.4 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.410.2 lib/rest-ftp-daemon/api/config.rb