Files
nemo_encoder/config/routes.rb
2017-01-25 17:35:30 +06:30

32 lines
1.0 KiB
Ruby

Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
root :to => 'home#index'
get "dashboard", to: "home#dashboard", as: "dashboard"
resources :batches,:only =>[:index]
devise_for :members
resources :batch_line_items,:only =>[:index,:create]
resources :users
#users
get 'check_registered_email' => "users#check_registered_email"
#Encoder
match 'batch_line_items/export' => 'batch_line_items#export', :as => 'export', :via => :post
namespace :api, defaults: {format: :json} do
#login
post "auth/login" =>"auth#login"
post "auth/logout" =>"auth#logout"
#Encoder
post "batch_line_items/register" =>"batch_line_items#register"
#Batch
post "batches" => "batches#create"
post "batches/end" => "batches#batch_end"
get "batches/resume_batch" =>"batches#resume_batch"
get "batches/batch_progress_list" =>"batches#batch_progress_list"
end
end