blob: bd91a811e6f5545f0a6f2566b8c1aeea12791dfd (
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 Model from '../_data/Model';
import { AuthService } from './auth.service';
import { API_SETTINGS } from 'src/config';
@Injectable({
providedIn: 'root'
})
export class ModelsService {
constructor(private http: HttpClient, private authService: AuthService) { }
addModel(model: Model) {
return this.http.post(`${API_SETTINGS.apiURL}/model/sendModel`, model, { headers: this.authService.authHeader(), responseType: 'text' });
}
}
|