API login/logout with http header token

This commit is contained in:
Min Zeya Phyo
2017-04-14 23:22:58 +06:30
parent db75780267
commit 5ca9615e38
11 changed files with 47 additions and 22 deletions

View File

@@ -6,15 +6,15 @@ Rails.application.routes.draw do
post 'install' => 'install#create'
#--------- Login/Authentication ------------#
post 'authenticate' => 'home#create'
delete 'authenticate' => 'home/destroy'
post 'login' => 'home#create'
delete 'logout' => 'home#destroy'
#--------- API Routes ------------#
namespace :api, :defaults => { :format => 'json' } do
#Session Login and Logout
post 'authenticate' => "autheticate#create"
delete 'authenticate' => "autheticate#destroy"
post 'authenticate' => "authenticate#create"
delete 'authenticate' => "authenticate#destroy"
namespace :restaurant do
get 'zones' => "zones#index"
@@ -35,7 +35,7 @@ Rails.application.routes.draw do
resources :menu_items, only: [:index, :show]
resources :menu_sold_out, only: [:index]
end
end
#Order Controller