mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Initial stab at check-in feature
This commit is contained in:
@@ -221,3 +221,9 @@ Devise.setup do |config|
|
||||
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
||||
# end
|
||||
end
|
||||
|
||||
#Check in the user if they sign in. (Devise uses Warden)
|
||||
Warden::Manager.after_authentication do |user,auth,opts|
|
||||
user.checkin unless user.checked_in?
|
||||
end
|
||||
|
||||
|
||||
@@ -4,4 +4,13 @@ Velocipede::Application.routes.draw do
|
||||
netzke
|
||||
|
||||
root :to => 'site#index'
|
||||
###########################
|
||||
# API Routes
|
||||
scope 'api', :module => :api do
|
||||
scope 'v1', :module => :v1 do
|
||||
post 'checkin' => "logs#checkin", :as => "api_checkin"
|
||||
post 'checkout' => "logs#checkout", :as => "api_checkout"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user