Skip to content

Commit 0b5c857

Browse files
committed
usero service v3
1 parent 389e386 commit 0b5c857

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

frontend/src/app/services/usero.service.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,30 @@ export class SignupService {
5959
);
6060
}
6161

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+
6286
/*createUser(user: Usero, password: String) {
6387
this.http.post(BASE_URL + '/signup', {username: user, password: password});
6488
}

0 commit comments

Comments
 (0)