1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = Object.setPrototypeOf ||
|
4 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
6 | return function (d, b) {
|
7 | extendStatics(d, b);
|
8 | function __() { this.constructor = d; }
|
9 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
10 | };
|
11 | })();
|
12 | Object.defineProperty(exports, "__esModule", { value: true });
|
13 | require("rxjs/add/operator/map");
|
14 | var HttpService_1 = require("./HttpService");
|
15 | var ReadOnlySingleServiceBase = (function (_super) {
|
16 | __extends(ReadOnlySingleServiceBase, _super);
|
17 | function ReadOnlySingleServiceBase(http, baseUrl) {
|
18 | return _super.call(this, http, baseUrl) || this;
|
19 | }
|
20 | ReadOnlySingleServiceBase.prototype.getItem = function () {
|
21 | return this.getItemInternal("");
|
22 | };
|
23 | ReadOnlySingleServiceBase.prototype.getItemInternal = function (hostUrl) {
|
24 | var _this = this;
|
25 | return this.http.get(hostUrl + this.baseUrl, { headers: this.getJsonHeaders })
|
26 | .map(function (r) { return _this.mapItem(r.json()); });
|
27 | };
|
28 | ReadOnlySingleServiceBase.prototype.mapItem = function (data) {
|
29 | return data;
|
30 | };
|
31 | return ReadOnlySingleServiceBase;
|
32 | }(HttpService_1.HttpServiceBase));
|
33 | exports.ReadOnlySingleServiceBase = ReadOnlySingleServiceBase;
|
34 |
|
\ | No newline at end of file |