641e7d9022cef77e4b50b0ef434f5844dada02c40e9df4f21a667d539dabde84.json 2.1 KB

1
  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 RestaurantsService = class RestaurantsService {\n constructor(http) {\n this.http = http;\n //url api\n this.apiUrl = environment.apiUrl;\n }\n // get users\n getRestaurants() {\n return this.http.get(`${this.apiUrl}/api/restaurants`);\n }\n static #_ = this.ctorParameters = () => [{\n type: HttpClient\n }];\n};\nRestaurantsService = __decorate([Injectable({\n providedIn: 'root'\n})], RestaurantsService);\nexport { RestaurantsService };","map":{"version":3,"names":["Injectable","HttpClient","environment","RestaurantsService","constructor","http","apiUrl","getRestaurants","get","_","__decorate","providedIn"],"sources":["C:\\FatboarProject\\angular-client\\src\\app\\services\\restaurants.service.ts"],"sourcesContent":["import { Restaurant } from './../models/restaurant';\r\nimport { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpHeaders, HttpParams } 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 RestaurantsService {\r\n\r\n constructor(private http : HttpClient) { }\r\n\r\n //url api\r\n private apiUrl = environment.apiUrl\r\n\r\n // get users\r\ngetRestaurants(): Observable<Restaurant[]> {\r\n return this.http.get<Restaurant[]>(`${this.apiUrl}/api/restaurants`);\r\n}\r\n\r\n\r\n\r\n}\r\n"],"mappings":";AACA,SAASA,UAAU,QAAQ,eAAe;AAC1C,SAASC,UAAU,QAAiC,sBAAsB;AAE1E,SAASC,WAAW,QAAQ,8BAA8B;AAKnD,IAAMC,kBAAkB,GAAxB,MAAMA,kBAAkB;EAE7BC,YAAoBC,IAAiB;IAAjB,KAAAA,IAAI,GAAJA,IAAI;IAExB;IACQ,KAAAC,MAAM,GAAGJ,WAAW,CAACI,MAAM;EAHM;EAKzC;EACFC,cAAcA,CAAA;IACZ,OAAO,IAAI,CAACF,IAAI,CAACG,GAAG,CAAe,GAAG,IAAI,CAACF,MAAM,kBAAkB,CAAC;EACtE;EAAC,QAAAG,CAAA,G;;;;AAVYN,kBAAkB,GAAAO,UAAA,EAH9BV,UAAU,CAAC;EACVW,UAAU,EAAE;CACb,CAAC,C,EACWR,kBAAkB,CAc9B;SAdYA,kBAAkB"},"metadata":{},"sourceType":"module","externalDependencies":[]}