1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-04-04 05:33:22 -04:00
Jason Denney a00c1ed925 Finished Checkin/out feature for now
-Checkin/out api methods can be used while signed in
-Added checkout button in Netzke App, which also signs out in addition to checking out.
2013-05-19 16:41:43 -04:00

22 lines
477 B
JavaScript

{
//this will give a 401 error, but made 401 exceptions forward to 'users/sign_in'
onSignOut: function(){
Ext.Ajax.request({
url: '/users/sign_out',
method: 'DELETE'
});
},
onCheckOut: function(){
Ext.Ajax.request({
url: '/api/v1/checkout',
method: 'POST',
success: function(response, opts) {
Ext.Ajax.request({
url: '/users/sign_out',
method: 'DELETE'
});
}
});
}
}