Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # frozen_string_literal: true
- Rails.application.routes.draw do
- default_url_options host: "localhost"
- mount Rswag::Ui::Engine => "/api-docs"
- mount Rswag::Api::Engine => "/api-docs"
- namespace :v1, as: nil, defaults: { format: "json" } do
- resources :apidocs, only: :index
- devise_for :users, path: "", path_names: {
- sign_in: "login",
- sign_out: "logout",
- registration: "signup",
- password: "password",
- confirmation: "confirmation"
- }, controllers: {
- sessions: "v1/users/sessions",
- registrations: "v1/users/registrations",
- passwords: "v1/users/passwords",
- confirmations: "v1/users/confirmations"
- }
- devise_scope :user do
- post "send_code", to: "users/registrations#send_code"
- post "confirm_phone", to: "users/registrations#confirm_phone"
- post "password/check", to: "users/passwords#check"
- put "confirmation", to: "users/confirmations#update"
- post "phone_confirmation", to: "users/confirmations#create_phone_confirmation"
- put "phone_confirmation", to: "users/confirmations#update_phone_confirmation"
- end
- resources :cities, only: :index
- resources :currencies, only: :index
- resource :member, only: [:edit, :update, :show, :destroy] do
- post :leave_company, on: :collection
- post :block_device, on: :collection
- end
- resources :companies, only: [:index, :create, :update, :show] do
- get :schemas
- post :destroy_company# , on: :collection
- resources :users, only: [:index, :new, :create, :edit, :update, :show, :destroy] do
- post :invite_to_company, on: :collection
- end
- resources :shops, only: [:index, :create, :update, :show, :destroy] do
- post :destroy_shop# , on: :collection
- end
- resources :contractors
- resources :shops, only: nil, module: :shops do
- resources :option_types, only: [:index, :show, :create, :update, :destroy]
- resources :products, only: [:index, :show, :create, :update] do
- post :destroy_products, on: :collection
- resources :variants, only: [:update]
- end
- resources :image_assets, only: [:create, :update, :destroy] do
- post :upload_base64, on: :collection
- end
- resources :categories, except: [:new, :edit, :destroy] do
- post :destroy_categories, on: :collection
- end
- resources :tags, only: [:index, :create, :update, :destroy] do
- get :search, on: :collection
- end
- resources :stocks, only: [:index, :create, :update, :show] do
- post :destroy_stock, on: :member
- end
- namespace :settings do
- resources :currencies, only: [:index, :create, :destroy] do
- resources :rates, only: [:index, :create, :destroy] do
- post :load, on: :collection
- end
- end
- resources :units, only: [:index, :create]
- resources :taxes, only: [:index, :create, :update, :destroy]
- end
- end
- end
- end
- resources :sms_callbacks, only: [], defaults: { format: "json" }, controller: "sms_callbacks" do
- post :sms_ru, on: :collection
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement