connexion avec le back (non testé)
This commit is contained in:
parent
22f6d316b4
commit
6b9a6d7c73
14 changed files with 215 additions and 130 deletions
|
|
@ -29,7 +29,7 @@ export class MessageService
|
|||
return this.http.put<any>(urlComplete, data, {withCredentials: true});
|
||||
}
|
||||
|
||||
delete(url: string): Observable<any>
|
||||
delete(url: string, params:HttpParams = new HttpParams()): Observable<any>
|
||||
{
|
||||
const urlComplete = environment.debutUrl + url ;
|
||||
return this.http.delete<any>(urlComplete,{withCredentials: true});
|
||||
|
|
|
|||
|
|
@ -6,10 +6,16 @@ import { Injectable } from '@angular/core';
|
|||
export class ProfilService
|
||||
{
|
||||
|
||||
getId(): number | null
|
||||
constructor()
|
||||
{
|
||||
this.setId(-1);
|
||||
this.setIsAdmin(false);
|
||||
}
|
||||
|
||||
getId(): number
|
||||
{
|
||||
let idString = localStorage.getItem('id');
|
||||
if(idString === null) return null;
|
||||
if(idString === null) return -1;
|
||||
else return parseInt(idString);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue