File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 11var RegistrationController = Em . Controller . extend ( {
22
33 actions : {
4-
4+
55 register : function ( ) {
6-
6+
77 var data , _this ;
88 _this = this ;
99 data = this . getProperties ( "email" , "password" ) ;
10-
10+
1111 return Em . $ . ajax ( {
12-
12+
1313 method : "POST" ,
14- url : "http://localhost:3000/ /users.json",
14+ url : window . ENV . server + " /users.json",
1515 dataType : 'json' ,
1616 data : {
1717 user : data
1818 }
19-
19+
2020 } ) . then ( ( function ( response ) {
2121
2222 return Em . run ( ( function ( ) {
23-
23+
2424 console . log ( "Registration Suceeded!" ) ;
25-
25+
2626 _this . get ( 'session' ) . authenticate ( 'authenticator:oauth2-password-grant' , {
2727 identification : data . email ,
2828 password : data . password
@@ -31,13 +31,13 @@ var RegistrationController = Em.Controller.extend({
3131 return _this . send ( "registrationSucceeded" , response ) ;
3232
3333 } ) ) ;
34-
34+
3535 } ) , ( function ( xhr , status , error ) {
36-
36+
3737 return Em . run ( ( function ( ) {
3838 return _this . send ( "registrationFailed" , xhr , status , error ) ;
3939 } ) ) ;
40-
40+
4141 } ) ) ;
4242
4343 } ,
You can’t perform that action at this time.
0 commit comments