Skip to content
Snippets Groups Projects

merge dev into main

Merged Zoe Michaela Dietmar Pfister requested to merge develop into main
23 files
+ 725
5
Compare changes
  • Side-by-side
  • Inline
Files
23
@@ -11,30 +11,34 @@ export class ApiService {
}
get(url: string) {
return this.http.get(url)
return this.http.get(url, {headers: this.getHttpHeader()})
.pipe(map((response: any) => {
return response;
}));
}
post(url: string, data: any) {
return this.http.post(url, data)
return this.http.post(url, data, {headers: this.getHttpHeader()})
.pipe(map((response: any) => {
return response;
}));
}
delete(url: string, id: string) {
return this.http.delete(url + '/' + id)
return this.http.delete(url + '/' + id, {headers: this.getHttpHeader()})
.pipe(map((response: any) => {
return response;
}));
}
put(url: string, id: string, data: any) {
return this.http.put(url + '/' + id, data)
return this.http.put(url + '/' + id, data, {headers: this.getHttpHeader()})
.pipe(map((response: any) => {
return response;
}));
}
private getHttpHeader() {
return {'Authorization': 'Bearer ' + localStorage.getItem('token')};
}
}
Loading