| 1 |
- {"ast":null,"code":"import { __decorate } from \"tslib\";\nimport { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { environment } from 'src/environments/environment';\nlet EmailService = class EmailService {\n constructor(http) {\n this.http = http;\n //url api\n this.apiUrl = environment.apiUrl;\n }\n // send email \n sendEmail(data, email, isgain, isactiive) {\n return this.http.post(`${this.apiUrl}/api/emails/send?email=${email}&isgain=${isgain}&isactive=${isactiive}`, data);\n }\n // get emails\n getAllEmail() {\n return this.http.get(`${this.apiUrl}/api/emails`);\n }\n static #_ = this.ctorParameters = () => [{\n type: HttpClient\n }];\n};\nEmailService = __decorate([Injectable({\n providedIn: 'root'\n})], EmailService);\nexport { EmailService };","map":{"version":3,"names":["HttpClient","Injectable","environment","EmailService","constructor","http","apiUrl","sendEmail","data","email","isgain","isactiive","post","getAllEmail","get","_","__decorate","providedIn"],"sources":["C:\\FatboarProject\\angular-client\\src\\app\\services\\email.service.ts"],"sourcesContent":["import { Observable } from 'rxjs';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Email } from '../models/email';\r\nimport { environment } from 'src/environments/environment';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EmailService {\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 email \r\nsendEmail(data : Email, email: string, isgain: string, isactiive: string): Observable<Email> {\r\n return this.http.post<Email>(`${this.apiUrl}/api/emails/send?email=${email}&isgain=${isgain}&isactive=${isactiive}`,data);\r\n}\r\n\r\n\r\n // get emails\r\n getAllEmail(): Observable<Email[]> {\r\n return this.http.get<Email[]>(`${this.apiUrl}/api/emails`);\r\n }\r\n \r\n}"],"mappings":";AACA,SAASA,UAAU,QAAQ,sBAAsB;AACjD,SAASC,UAAU,QAAQ,eAAe;AAE1C,SAASC,WAAW,QAAQ,8BAA8B;AAKnD,IAAMC,YAAY,GAAlB,MAAMA,YAAY;EAEvBC,YAAoBC,IAAiB;IAAjB,KAAAA,IAAI,GAAJA,IAAI;IAExB;IACQ,KAAAC,MAAM,GAAGJ,WAAW,CAACI,MAAM;EAHM;EAK3C;EACAC,SAASA,CAACC,IAAY,EAAEC,KAAa,EAAEC,MAAc,EAAEC,SAAiB;IACtE,OAAO,IAAI,CAACN,IAAI,CAACO,IAAI,CAAQ,GAAG,IAAI,CAACN,MAAM,0BAA0BG,KAAK,WAAWC,MAAM,aAAaC,SAAS,EAAE,EAACH,IAAI,CAAC;EAC3H;EAGE;EACAK,WAAWA,CAAA;IACT,OAAO,IAAI,CAACR,IAAI,CAACS,GAAG,CAAU,GAAG,IAAI,CAACR,MAAM,aAAa,CAAC;EAC5D;EAAC,QAAAS,CAAA,G;;;;AAhBUZ,YAAY,GAAAa,UAAA,EAHxBf,UAAU,CAAC;EACVgB,UAAU,EAAE;CACb,CAAC,C,EACWd,YAAY,CAkBxB;SAlBYA,YAAY"},"metadata":{},"sourceType":"module","externalDependencies":[]}
|