summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
blob: 7f803c83434edda182e3b0a4b5dc3c537cbb34fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

# The father class of all controllers.
class ApplicationController < ActionController::API
  def logic(permitted_params)
    @logic = Object.const_get("#{self.class}::#{action_name.camelize}Logic").new(permitted_params)
  end

  private

  def generate_token
    Services::TokenGenerationService.new(service_params).call(DateTime.current + 5.days)
  end
end