Sha256: 36ac6b6cd9895a41e68c160ff222195c35fe43bf155e3cae565dfb27f963e981

Contents?: true

Size: 600 Bytes

Versions: 6

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

require 'jwt'

module Osso
  class Admin < Sinatra::Base
    include AppConfig
    helpers Helpers::Auth
    register Sinatra::Namespace

    before do
      chomp_token
    end

    namespace '/admin' do
      get '' do
        admin_protected!

        erb :admin
      end

      get '/enterprise' do
        admin_protected!

        erb :admin
      end

      get '/enterprise/:domain' do
        enterprise_protected!(params[:domain])

        erb :admin
      end

      get '/config' do
        admin_protected!

        erb :admin
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
osso-0.0.3.11 lib/osso/routes/admin.rb
osso-0.0.3.9 lib/osso/routes/admin.rb
osso-0.0.3.8 lib/osso/routes/admin.rb
osso-0.0.3.7 lib/osso/routes/admin.rb
osso-0.0.3.6 lib/osso/routes/admin.rb
osso-0.0.3.5 lib/osso/routes/admin.rb