Merge pull request #29 from WebEngineering2/frontend

Frontend
This commit is contained in:
kevinpauer
2022-03-28 18:07:35 +02:00
committed by GitHub
13 changed files with 144 additions and 50 deletions

View File

@@ -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
);