Sha256: dfba0efefeca3755d2cd12bb0a6aadb794fa0aef6d43d67764db545934ebb049

Contents?: true

Size: 1.63 KB

Versions: 2

Compression:

Stored size: 1.63 KB

Contents

Comable::Core::Engine.routes.draw do
  namespace :admin do
    root to: 'dashboard#show'

    resource :dashboard, only: :show

    resources :products do
      resources :variants, except: :index

      resources :stocks

      collection do
        get :export
        post :import
      end
    end

    resources :stocks do
      collection do
        get :export
        post :import
      end
    end

    resources :variants, only: :index

    resources :orders, except: :create do
      collection do
        get :export
      end

      member do
        post :cancel
        post :resume
        post :cancel_payment
        post :resume_payment
        post :ship
        post :cancel_shipment
        post :resume_shipment
      end
    end

    resources :draft_orders

    resources :categories
    resources :stock_locations
    resources :pages

    resources :navigations do
      post :search_linkable_ids, on: :collection
    end

    resources :users
    resources :shipment_methods
    resources :payment_methods
    resources :trackers

    resources :themes do
      member do
        get 'tree', action: :tree, as: :tree
        get 'file/*path', action: :show_file, constraints: { path: /.+/, format: false }, as: :file
        put 'file/*path', action: :update_file, constraints: { path: /.+/, format: false }
        put :use
      end
    end

    resource :store, controller: :store, only: [:show, :edit, :update]

    devise_for :users, path: :user, class_name: Comable::User.name, module: :devise, router_name: :comable, controllers: {
      sessions: 'comable/admin/user_sessions'
    }

    get :profile, controller: :users
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
comable-backend-0.7.1 config/routes.rb
comable-backend-0.7.0 config/routes.rb