You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
611 B
26 lines
611 B
import { Injectable } from '@angular/core';
|
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
import { environment } from '../../../environments/environment';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class FriendsService {
|
|
|
|
private apiURL = environment.apiURL;
|
|
private token = localStorage.getItem('auth_token');
|
|
constructor(private http: HttpClient) { }
|
|
|
|
|
|
getFriend(){
|
|
const url = `${this.apiURL}/friends`;
|
|
const headers = new HttpHeaders({
|
|
'Content-Type': 'application/json',
|
|
Authorization: 'Bearer ' + this.token,
|
|
});
|
|
return this.http.get(url);
|
|
}
|
|
|
|
|
|
}
|