Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix ajax error callback function

  • Loading branch information...
commit a6180200786b68c75458561c82b9fe35c8df1821 1 parent 4a91c01
@reyesyang authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 app/assets/javascripts/persona.js.coffee
View
10 app/assets/javascripts/persona.js.coffee
@@ -3,7 +3,7 @@ $ () ->
$logout_button = $("#logout-button")
navigator.id.watch
- loggedInUser: ($.cookie('email') || null)
+ loggedInUser: $.cookie('email') || null
onlogin: (assertion) ->
$.ajax
type: 'POST'
@@ -13,8 +13,8 @@ $ () ->
}
success: (res, status, xhr) ->
window.location.reload()
- error: (res, status, xhr) ->
- alert("Signin Failed!")
+ error: (xhr, status, error) ->
+ alert("Login Failed!")
onlogout: () ->
$.ajax
@@ -22,8 +22,8 @@ $ () ->
url: '/logout.json',
success: (res, status, xhr) ->
window.location.reload()
- error: (res, status, xhr) ->
- alert("Signout Failed")
+ error: (xhr, status, error) ->
+ alert("Logout Failed")
$login_button.on "click", (e) ->
e.preventDefault()
Please sign in to comment.
Something went wrong with that request. Please try again.