blob: 60d1bfb26c249da9b4671185f26a0de553cb9fc7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { API_SETTINGS } from 'src/config';
import Experiment from '../_data/Experiment';
import { AuthService } from './auth.service';
@Injectable({
providedIn: 'root'
})
export class ExperimentsService {
constructor(private http: HttpClient, private authService: AuthService) { }
addExperiment(experiment: Experiment): Observable<any> {
return this.http.post(`${API_SETTINGS.apiURL}/experiment/add`, experiment, { headers: this.authService.authHeader() });
}
}
|