import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ResponseData } from 'src/app/interfaces/response-data'; import { USERInterface } from 'src/app/interfaces/user-interface'; import { IAMService } from '../../iam/iam.service'; @Injectable({ providedIn: 'root' }) export class MESMSVService { private _url = 'https://qasirh.ittec.mx/v1/public/api/MESMSV'; jwt = localStorage.getItem('jwt'); header = new HttpHeaders().set('Authorization', 'Bearer ' + this.jwt); constructor( private http: HttpClient, private _snackBar: MatSnackBar, ) { } crear(data: any) { return this.http.post(`${this._url}/insertar`, data, { headers: this.header }); } modificar(data: any) { return this.http.post(`${this._url}/modificar`, data, { headers: this.header }); } }