Implement sessions/create in JSON API
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
class Api::ApplicationController < ApplicationController
|
||||
skip_before_filter :verify_authenticity_token
|
||||
skip_before_filter :authenticate!, :only => [:cor_preflight]
|
||||
|
||||
before_filter :cor_filter
|
||||
|
||||
def cor_filter
|
||||
@@ -12,4 +15,8 @@ class Api::ApplicationController < ApplicationController
|
||||
|
||||
head :ok
|
||||
end
|
||||
|
||||
def authenticate!
|
||||
head :unauthorized if current_user.nil?
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user