Finish Skeleton; Add and redesign login page
This commit is contained in:
@@ -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
|
||||
// );
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -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' });
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user