imagenes.service.ts 684 Bytes
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { appSettings } from 'src/etc/AppSettings';

@Injectable({
  providedIn: 'root'
})
export class ImagenesService {

  constructor(private http: HttpClient) { }

  getAllWithPaginator(page: number = 1): Observable<any> {

    return this.http.get(`${appSettings.apiImagenes}/articulos/${page}`);
  }

  saveInBase(body): Observable<any> {

    return this.http.post(`${appSettings.apiImagenes}/imagenes/guardar`, body);
  }

  deleteImage(body): Observable<any> {

    return this.http.post(`${appSettings.apiImagenes}/imagen/borrar`, body);
  }

}