Add logout functionality
This commit is contained in:
@@ -1,22 +1,23 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
const API_URL = 'https://aktienbot.flokaiser.com/api/user';
|
||||
const API_URL = 'https://aktienbot.flokaiser.com/api/';
|
||||
const httpOptions = {
|
||||
headers: new HttpHeaders({
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer',
|
||||
}),
|
||||
};
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class DataService {
|
||||
constructor(private http: HttpClient) {}
|
||||
getPublicContent(): Observable<any> {
|
||||
return this.http.get(API_URL + 'all', { responseType: 'text' });
|
||||
return this.http.get(API_URL + 'portfolio', { 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' });
|
||||
|
||||
showStorage() {
|
||||
console.log(localStorage);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user