Sha256: 63dbf5556cb6bdb98962ba30492a8fb971f6092d48a19dbf82821e80360723b1

Contents?: true

Size: 524 Bytes

Versions: 3

Compression:

Stored size: 524 Bytes

Contents

module RestFtpDaemon
  module API
    class Config < Grape::API

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

      desc "Reload daemon config"
      post "/reload" do
        if Conf.at(:debug, :allow_reload)==true
          Conf.reload!
          status 200
          return Helpers.get_censored_config
        else
          status 403
          return "Config reload not permitted"
        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.300.3 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.300.2 lib/rest-ftp-daemon/api/config.rb
rest-ftp-daemon-0.300.1 lib/rest-ftp-daemon/api/config.rb