Finish Skeleton; Add and redesign login page

This commit is contained in:
kevinpauer
2022-03-15 21:45:41 +01:00
parent b4e2848b11
commit 2375abbdcf
16 changed files with 291 additions and 61 deletions

View File

@@ -10,25 +10,25 @@ const httpOptions = {
})
export class AuthService {
constructor(private http: HttpClient) {}
login(username: string, password: string): Observable<any> {
return this.http.post(
AUTH_API + 'signin',
{
username,
password,
},
httpOptions
);
}
register(username: string, email: string, password: string): Observable<any> {
return this.http.post(
AUTH_API + 'signup',
{
username,
email,
password,
},
httpOptions
);
}
// login(username: string, password: string): Observable<any> {
// return this.http.post(
// AUTH_API + 'signin',
// {
// username,
// password,
// },
// httpOptions
// );
// }
// register(username: string, email: string, password: string): Observable<any> {
// return this.http.post(
// AUTH_API + 'signup',
// {
// username,
// email,
// password,
// },
// httpOptions
// );
// }
}

View File

@@ -7,16 +7,16 @@ const API_URL = 'http://localhost:8080/api/test/';
})
export class UserService {
constructor(private http: HttpClient) {}
getPublicContent(): Observable<any> {
return this.http.get(API_URL + 'all', { responseType: 'text' });
}
getUserBoard(): Observable<any> {
return this.http.get(API_URL + 'user', { responseType: 'text' });
}
getModeratorBoard(): Observable<any> {
return this.http.get(API_URL + 'mod', { responseType: 'text' });
}
getAdminBoard(): Observable<any> {
return this.http.get(API_URL + 'admin', { responseType: 'text' });
}
// getPublicContent(): Observable<any> {
// return this.http.get(API_URL + 'all', { responseType: 'text' });
// }
// getUserBoard(): Observable<any> {
// return this.http.get(API_URL + 'user', { responseType: 'text' });
// }
// getModeratorBoard(): Observable<any> {
// return this.http.get(API_URL + 'mod', { responseType: 'text' });
// }
// getAdminBoard(): Observable<any> {
// return this.http.get(API_URL + 'admin', { responseType: 'text' });
// }
}