@@ -11,18 +11,19 @@ const httpOptions = {
|
||||
})
|
||||
export class AuthService {
|
||||
constructor(private http: HttpClient) {}
|
||||
login(username: string, password: string): Observable<any> {
|
||||
login(email: string, password: string): Observable<any> {
|
||||
return this.http.post(AUTH_API + '/login', {
|
||||
username,
|
||||
email,
|
||||
password,
|
||||
});
|
||||
}
|
||||
register(username: string, password: string): Observable<any> {
|
||||
register(email: string, username: string, password: string): Observable<any> {
|
||||
return this.http.post(
|
||||
AUTH_API + '/register',
|
||||
{
|
||||
username,
|
||||
email,
|
||||
password,
|
||||
username,
|
||||
},
|
||||
httpOptions
|
||||
);
|
||||
|
Reference in New Issue
Block a user