File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
frontend/src/app/services Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,30 @@ export class SignupService {
59
59
) ;
60
60
}
61
61
62
+ updatePassword ( user : Usero ) {
63
+ return this . http . put ( BASE_URL + user . id + '/password' , user ) . pipe (
64
+ catchError ( ( error : any ) => this . handleError ( error ) )
65
+ ) ;
66
+ }
67
+
68
+ setUserCreditCard ( user : Usero ) {
69
+
70
+ if ( ! user . creditCard ) {
71
+ return this . http . post ( BASE_URL , user . id + '/creditCard' )
72
+ . pipe (
73
+ catchError ( ( error : any ) => this . handleError ( error ) )
74
+ ) ;
75
+ } else {
76
+ return this . http . put ( BASE_URL + user . id + '/creditCard' , user ) . pipe (
77
+ catchError ( ( error : any ) => this . handleError ( error ) )
78
+ ) ;
79
+ }
80
+ }
81
+
82
+
83
+
84
+
85
+
62
86
/*createUser(user: Usero, password: String) {
63
87
this.http.post(BASE_URL + '/signup', {username: user, password: password});
64
88
}
You can’t perform that action at this time.
0 commit comments