Advertisement
michussj07

car-status.service.ts

Feb 13th, 2020
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. import { Injectable } from '@angular/core';
  2. import {HttpClient} from '@angular/common/http';
  3. import {ConfigService} from '../../../services/config.service';
  4. import {Observable} from 'rxjs';
  5.  
  6. @Injectable({
  7. providedIn: 'root'
  8. })
  9. export class CarStatusService {
  10.  
  11. constructor(private http:HttpClient, private configService: ConfigService) { }
  12.  
  13. private _car_status_url = this.configService._api_url +'/cars-status';
  14.  
  15. getCarStatusList(): Observable<any> {
  16. return this.http.get(this._car_status_url + '/all');
  17. }
  18.  
  19. createCarStatus(carStatus: object): Observable<object> {
  20. return this.http.post(this._car_status_url , carStatus);
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement