| 1 |
- {"ast":null,"code":"import { __decorate } from \"tslib\";\nimport { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { environment } from 'src/environments/environment';\nlet ContactService = class ContactService {\n constructor(http) {\n this.http = http;\n //url api\n this.apiUrl = environment.apiUrl;\n }\n // send message contact\n sendMsgContact(credentials) {\n return this.http.post(`${this.apiUrl}/api/contact`, credentials);\n }\n // get contact open\n getOpenMessage() {\n return this.http.get(`${this.apiUrl}/api/contact/open`);\n }\n // get contact close\n getColseMessage() {\n return this.http.get(`${this.apiUrl}/api/contact/closed`);\n }\n // close contact\n closeContact(body) {\n return this.http.patch(`${this.apiUrl}/api/contact`, body);\n }\n // response contact\n responseContact(id, body) {\n return this.http.post(`${this.apiUrl}/api/contact/response?id=${id}`, body);\n }\n static #_ = this.ctorParameters = () => [{\n type: HttpClient\n }];\n};\nContactService = __decorate([Injectable({\n providedIn: 'root'\n})], ContactService);\nexport { ContactService };","map":{"version":3,"names":["Injectable","HttpClient","environment","ContactService","constructor","http","apiUrl","sendMsgContact","credentials","post","getOpenMessage","get","getColseMessage","closeContact","body","patch","responseContact","id","_","__decorate","providedIn"],"sources":["C:\\FatboarProject\\angular-client\\src\\app\\services\\contact.service.ts"],"sourcesContent":["import { Contact } from './../models/contact';\r\nimport { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { environment } from 'src/environments/environment';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ContactService {\r\n\r\n constructor(private http: HttpClient) { }\r\n\r\n //url api\r\n private apiUrl = environment.apiUrl\r\n\r\n // send message contact\r\n sendMsgContact(credentials): Observable<any> {\r\n return this.http.post<any>(`${this.apiUrl}/api/contact`, credentials);\r\n }\r\n\r\n\r\n // get contact open\r\n getOpenMessage(): Observable<Contact[]> {\r\n return this.http.get<Contact[]>(`${this.apiUrl}/api/contact/open`);\r\n }\r\n\r\n\r\n // get contact close\r\n getColseMessage(): Observable<Contact[]> {\r\n return this.http.get<Contact[]>(`${this.apiUrl}/api/contact/closed`);\r\n }\r\n\r\n // close contact\r\n closeContact(body): Observable<any> {\r\n return this.http.patch<any>(`${this.apiUrl}/api/contact`,body);\r\n }\r\n\r\n\r\n // response contact\r\n responseContact(id, body): Observable<any> {\r\n return this.http.post<any>(`${this.apiUrl}/api/contact/response?id=${id}`, body);\r\n }\r\n\r\n\r\n}"],"mappings":";AACA,SAASA,UAAU,QAAQ,eAAe;AAC1C,SAASC,UAAU,QAAQ,sBAAsB;AAEjD,SAASC,WAAW,QAAQ,8BAA8B;AAKnD,IAAMC,cAAc,GAApB,MAAMA,cAAc;EAEzBC,YAAoBC,IAAgB;IAAhB,KAAAA,IAAI,GAAJA,IAAI;IAExB;IACQ,KAAAC,MAAM,GAAGJ,WAAW,CAACI,MAAM;EAHK;EAKxC;EACAC,cAAcA,CAACC,WAAW;IACxB,OAAO,IAAI,CAACH,IAAI,CAACI,IAAI,CAAM,GAAG,IAAI,CAACH,MAAM,cAAc,EAAEE,WAAW,CAAC;EACvE;EAGA;EACAE,cAAcA,CAAA;IACZ,OAAO,IAAI,CAACL,IAAI,CAACM,GAAG,CAAY,GAAG,IAAI,CAACL,MAAM,mBAAmB,CAAC;EACpE;EAGA;EACAM,eAAeA,CAAA;IACb,OAAO,IAAI,CAACP,IAAI,CAACM,GAAG,CAAY,GAAG,IAAI,CAACL,MAAM,qBAAqB,CAAC;EACtE;EAEA;EACAO,YAAYA,CAACC,IAAI;IACf,OAAO,IAAI,CAACT,IAAI,CAACU,KAAK,CAAM,GAAG,IAAI,CAACT,MAAM,cAAc,EAACQ,IAAI,CAAC;EAChE;EAGA;EACAE,eAAeA,CAACC,EAAE,EAAEH,IAAI;IACtB,OAAO,IAAI,CAACT,IAAI,CAACI,IAAI,CAAM,GAAG,IAAI,CAACH,MAAM,4BAA4BW,EAAE,EAAE,EAAEH,IAAI,CAAC;EAClF;EAAC,QAAAI,CAAA,G;;;;AAjCUf,cAAc,GAAAgB,UAAA,EAH1BnB,UAAU,CAAC;EACVoB,UAAU,EAAE;CACb,CAAC,C,EACWjB,cAAc,CAoC1B;SApCYA,cAAc"},"metadata":{},"sourceType":"module","externalDependencies":[]}
|