# frozen_string_literal: true

Maquina::Engine.routes.draw do
  resource :unauthorized, controller: :unauthorized, only: [:show]

  resource :sessions, path: I18n.t("routes.sessions"), only: [:new, :create, :destroy]
  resource :multifactor, only: [:new, :create]

  get I18n.t("routes.accept_invitation"), to: "accept_invitations#new", as: :new_accept_invitations
  patch I18n.t("routes.accept_invitation"), to: "accept_invitations#update", as: :accept_invitations

  resources :plans, path: I18n.t("routes.plans"), except: [:show, :destroy]
  resources :users, path: I18n.t("routes.users"), only: [:index]
  resources :invitations, path: I18n.t("routes.invitations"), only: [:new, :create]

  root to: "dashboard#index"
end