truemail-rb/truemail-rack

View on GitHub
app/truemail_server/controllers/version/show.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module TruemailServer
  module Controllers
    module Version
      class Show < TruemailServer::Controllers::Base
        def call
          return respond_with(401, error(ACCESS_ERROR)) unless token_valid?

          respond_with(200, TruemailServer::Services::Environment.call)
        end
      end
    end
  end
end