made some changes

This commit is contained in:
Kayaya
2020-08-06 14:31:07 +01:00
parent d25ebc0d28
commit 4e143a55a4
12 changed files with 142 additions and 115 deletions
+9 -13
View File
@@ -1,22 +1,18 @@
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
/* import { environment } from 'src/environments/environment.prod'; */
import { environment } from '../../environments/environment';
@Injectable({
providedIn: 'root'
providedIn: 'root'
})
export class HttpService {
constructor(private http: HttpClient) {}
constructor(private http: HttpClient) { }
post(serviceName: string, data: any) {
const headers = new HttpHeaders();
const options = { headers: headers, withCredintials: false };
const url = environment.apiURL + serviceName;
post(serviceName: string, data: any){
const headers = new HttpHeaders();
const options = { header: headers, withCredintials: false}
const url = environment.apiURL + serviceName;
/* const this.http.post(url, JSON.stringify(data), options); */
}
return this.http.post(url, JSON.stringify(data), options);
}
}