summaryrefslogtreecommitdiff
path: root/config/routes.rb
blob: 06c5a88d61fa579a53ac2d7d05044a3d81442eb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

Rails.application.routes.draw do
  # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html

  # Defines the root path route ("/")
  # root "articles#index"
  namespace :api do
    post '/login', to: 'sessions#create'
    delete '/logout', to: 'sessions#destroy'
    get '/account', to: 'user_accounts#show'
    put '/account', to: 'user_accounts#update'
    resources :companies, only: %i[index show create update]
    resources :products, only: %i[index show create update destroy]
    resources :user_accounts, only: %i[create]
    resources :refresh_tokens, only: %i[create]
  end
end