trucs de menu et token
This commit is contained in:
parent
1d96834459
commit
476cc12cc0
7 changed files with 18 additions and 12 deletions
|
|
@ -45,7 +45,7 @@ apiUrl: string;
|
|||
}
|
||||
|
||||
deleteMenu(id:number): Observable<any> {
|
||||
return this.http.delete(`${this.apiUrl}/menus/delete/${id}`);
|
||||
return this.http.delete(`${this.apiUrl}/menus/delete/${id}`, {responseType:"text"});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ tokenKey = environment.tokenKey;
|
|||
public eraseToken(): string | null {
|
||||
const token = localStorage.getItem(this.tokenKey);
|
||||
if(token) {
|
||||
this.tokenKey = '';
|
||||
localStorage.removeItem(this.tokenKey);
|
||||
return token;
|
||||
}else {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue