diff --git a/package-lock.json b/package-lock.json index a412a520..2731ca3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -446,9 +446,9 @@ "integrity": "sha512-mPeeFLhCXCxTrHh99A/0DcRCJKcNM5bkFKgp2qLxYF8tPVcK1HFmsQpqPAkAS2afxhJUps7FqTm6cb22oF3uoA==" }, "angular-in-memory-web-api": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/angular-in-memory-web-api/-/angular-in-memory-web-api-0.4.6.tgz", - "integrity": "sha1-EB9Zo4XrFTnH+TB1uv0MHLd061g=" + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/angular-in-memory-web-api/-/angular-in-memory-web-api-0.5.0.tgz", + "integrity": "sha1-A372pLPq6kMpzGjEY/Y9oWB/Xsk=" }, "angular-resizable-element": { "version": "1.2.3", @@ -1285,7 +1285,6 @@ "requires": { "anymatch": "1.3.0", "async-each": "1.0.1", - "fsevents": "1.1.2", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -3319,905 +3318,6 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "fsevents": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.2.tgz", - "integrity": "sha512-Sn44E5wQW4bTHXvQmvSHwqbuiXtduD6Rrjm2ZtUEGbyrig+nUH3t/QD4M4/ZXViY556TBpRgZkHLDx3JxPwxiw==", - "dev": true, - "optional": true, - "requires": { - "nan": "2.6.2", - "node-pre-gyp": "0.6.36" - }, - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "ajv": { - "version": "4.11.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "co": "4.6.0", - "json-stable-stringify": "1.0.1" - } - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "1.0.0", - "readable-stream": "2.2.9" - } - }, - "asn1": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "assert-plus": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws-sign2": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "balanced-match": { - "version": "0.4.2", - "bundled": true, - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "block-stream": { - "version": "0.0.9", - "bundled": true, - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, - "boom": { - "version": "2.10.1", - "bundled": true, - "dev": true, - "requires": { - "hoek": "2.16.3" - } - }, - "brace-expansion": { - "version": "1.1.7", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "0.4.2", - "concat-map": "0.0.1" - } - }, - "buffer-shims": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true - }, - "co": { - "version": "4.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "requires": { - "delayed-stream": "1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "boom": "2.10.1" - } - }, - "dashdash": { - "version": "1.14.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "debug": { - "version": "2.6.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - }, - "deep-extend": { - "version": "0.4.2", - "bundled": true, - "dev": true, - "optional": true - }, - "delayed-stream": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "extend": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "extsprintf": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "optional": true - }, - "form-data": { - "version": "2.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.15" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "inherits": "2.0.3", - "mkdirp": "0.5.1", - "rimraf": "2.6.1" - } - }, - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fstream": "1.0.11", - "inherits": "2.0.3", - "minimatch": "3.0.4" - } - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "1.1.1", - "console-control-strings": "1.1.0", - "has-unicode": "2.0.1", - "object-assign": "4.1.1", - "signal-exit": "3.0.2", - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wide-align": "1.1.2" - } - }, - "getpass": { - "version": "0.1.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "glob": { - "version": "7.1.2", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true, - "dev": true - }, - "har-schema": { - "version": "1.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ajv": "4.11.8", - "har-schema": "1.0.5" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "boom": "2.10.1", - "cryptiles": "2.0.5", - "hoek": "2.16.3", - "sntp": "1.0.9" - } - }, - "hoek": { - "version": "2.16.3", - "bundled": true, - "dev": true - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "0.2.0", - "jsprim": "1.4.0", - "sshpk": "1.13.0" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "1.4.0", - "wrappy": "1.0.2" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "ini": { - "version": "1.3.4", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true, - "dev": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "jsonify": "0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "jsonify": { - "version": "0.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "jsprim": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.0.2", - "json-schema": "0.2.3", - "verror": "1.3.6" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "mime-db": { - "version": "1.27.0", - "bundled": true, - "dev": true - }, - "mime-types": { - "version": "2.1.15", - "bundled": true, - "dev": true, - "requires": { - "mime-db": "1.27.0" - } - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "node-pre-gyp": { - "version": "0.6.36", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "mkdirp": "0.5.1", - "nopt": "4.0.1", - "npmlog": "4.1.0", - "rc": "1.2.1", - "request": "2.81.0", - "rimraf": "2.6.1", - "semver": "5.3.0", - "tar": "2.2.1", - "tar-pack": "3.4.0" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1.1.0", - "osenv": "0.1.4" - } - }, - "npmlog": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "1.1.4", - "console-control-strings": "1.1.0", - "gauge": "2.7.4", - "set-blocking": "2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "1.0.2", - "os-tmpdir": "1.0.2" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true, - "dev": true - }, - "punycode": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true - }, - "qs": { - "version": "6.4.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "0.4.2", - "ini": "1.3.4", - "minimist": "1.2.0", - "strip-json-comments": "2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "dev": true, - "requires": { - "buffer-shims": "1.0.0", - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "1.0.7", - "string_decoder": "1.0.1", - "util-deprecate": "1.0.2" - } - }, - "request": { - "version": "2.81.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aws-sign2": "0.6.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "1.0.5", - "extend": "3.0.1", - "forever-agent": "0.6.1", - "form-data": "2.1.4", - "har-validator": "4.2.1", - "hawk": "3.1.3", - "http-signature": "1.1.1", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.15", - "oauth-sign": "0.8.2", - "performance-now": "0.2.0", - "qs": "6.4.0", - "safe-buffer": "5.0.1", - "stringstream": "0.0.5", - "tough-cookie": "2.3.2", - "tunnel-agent": "0.6.0", - "uuid": "3.0.1" - } - }, - "rimraf": { - "version": "2.6.1", - "bundled": true, - "dev": true, - "requires": { - "glob": "7.1.2" - } - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.3.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "hoek": "2.16.3" - } - }, - "sshpk": { - "version": "1.13.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jodid25519": "1.0.2", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - }, - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "stringstream": { - "version": "0.0.5", - "bundled": true, - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "dev": true, - "requires": { - "block-stream": "0.0.9", - "fstream": "1.0.11", - "inherits": "2.0.3" - } - }, - "tar-pack": { - "version": "3.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "2.6.8", - "fstream": "1.0.11", - "fstream-ignore": "1.0.5", - "once": "1.4.0", - "readable-stream": "2.2.9", - "rimraf": "2.6.1", - "tar": "2.2.1", - "uid-number": "0.0.6" - } - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "punycode": "1.4.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "dev": true, - "optional": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "uuid": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "verror": { - "version": "1.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "extsprintf": "1.0.2" - } - }, - "wide-align": { - "version": "1.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "1.0.2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - } - } - }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", @@ -8748,6 +7848,15 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -8775,15 +7884,6 @@ } } }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", diff --git a/package.json b/package.json index 328a766b..6b92a44d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@swimlane/ngx-datatable": "9.3.1", "@swimlane/ngx-dnd": "3.0.0", "angular-calendar": "0.21.2", - "angular-in-memory-web-api": "0.4.6", + "angular-in-memory-web-api": "0.5.0", "angular2-markdown": "1.6.0", "classlist.js": "1.1.20150312", "core-js": "2.5.1", diff --git a/src/app/main/content/apps/calendar/calendar.service.ts b/src/app/main/content/apps/calendar/calendar.service.ts index 1a9ae423..8ae8a130 100644 --- a/src/app/main/content/apps/calendar/calendar.service.ts +++ b/src/app/main/content/apps/calendar/calendar.service.ts @@ -35,7 +35,7 @@ export class CalendarService implements Resolve this.http.get('api/calendar/events') .subscribe((response: any) => { - this.events = response.data.data; + this.events = response.data; this.onEventsUpdated.next(this.events); resolve(this.events); }, reject); diff --git a/src/app/main/content/apps/chat/chat.service.ts b/src/app/main/content/apps/chat/chat.service.ts index 3337b080..cc33e2b5 100644 --- a/src/app/main/content/apps/chat/chat.service.ts +++ b/src/app/main/content/apps/chat/chat.service.ts @@ -48,7 +48,7 @@ export class ChatService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/chat-chats/' + chatItem.id) .subscribe((response: any) => { - const chat = response.data; + const chat = response; const chatContact = this.contacts.find((contact) => { return contact.id === contactId; @@ -212,7 +212,7 @@ export class ChatService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/chat-contacts') .subscribe((response: any) => { - resolve(response.data); + resolve(response); }, reject); }); } @@ -226,7 +226,7 @@ export class ChatService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/chat-chats') .subscribe((response: any) => { - resolve(response.data); + resolve(response); }, reject); }); } @@ -240,7 +240,7 @@ export class ChatService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/chat-user') .subscribe((response: any) => { - resolve(response.data[0]); + resolve(response[0]); }, reject); }); } diff --git a/src/app/main/content/apps/contacts/contacts.service.ts b/src/app/main/content/apps/contacts/contacts.service.ts index 7774f65a..4c96bed4 100644 --- a/src/app/main/content/apps/contacts/contacts.service.ts +++ b/src/app/main/content/apps/contacts/contacts.service.ts @@ -67,7 +67,7 @@ export class ContactsService implements Resolve this.http.get('api/contacts-contacts') .subscribe((response: any) => { - this.contacts = response.data; + this.contacts = response; if ( this.filterBy === 'starred' ) { @@ -104,7 +104,7 @@ export class ContactsService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/contacts-user/5725a6802d10e277a0f35724') .subscribe((response: any) => { - this.user = response.data; + this.user = response; this.onUserDataChanged.next(this.user); resolve(this.user); }, reject); diff --git a/src/app/main/content/apps/dashboards/project/projects.service.ts b/src/app/main/content/apps/dashboards/project/projects.service.ts index 1b103613..f9d9d219 100644 --- a/src/app/main/content/apps/dashboards/project/projects.service.ts +++ b/src/app/main/content/apps/dashboards/project/projects.service.ts @@ -43,8 +43,8 @@ export class ProjectsDashboardService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/projects-dashboard-projects') .subscribe((response: any) => { - this.projects = response.data; - resolve(response.data); + this.projects = response; + resolve(response); }, reject); }); } @@ -54,8 +54,8 @@ export class ProjectsDashboardService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/projects-dashboard-widgets') .subscribe((response: any) => { - this.widgets = response.data; - resolve(response.data); + this.widgets = response; + resolve(response); }, reject); }); } diff --git a/src/app/main/content/apps/file-manager/file-manager.service.ts b/src/app/main/content/apps/file-manager/file-manager.service.ts index 82e33c53..b1145636 100644 --- a/src/app/main/content/apps/file-manager/file-manager.service.ts +++ b/src/app/main/content/apps/file-manager/file-manager.service.ts @@ -41,9 +41,9 @@ export class FileManagerService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/file-manager') .subscribe((response: any) => { - this.onFilesChanged.next(response.data); - this.onFileSelected.next(response.data[0]); - resolve(response.data); + this.onFilesChanged.next(response); + this.onFileSelected.next(response[0]); + resolve(response); }, reject); }); } diff --git a/src/app/main/content/apps/mail/mail.service.ts b/src/app/main/content/apps/mail/mail.service.ts index 95d793cd..796fa88e 100644 --- a/src/app/main/content/apps/mail/mail.service.ts +++ b/src/app/main/content/apps/mail/mail.service.ts @@ -89,7 +89,7 @@ export class MailService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/mail-folders') .subscribe((response: any) => { - this.folders = response.data; + this.folders = response; this.onFoldersChanged.next(this.folders); resolve(this.folders); }, reject); @@ -105,7 +105,7 @@ export class MailService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/mail-filters') .subscribe((response: any) => { - this.filters = response.data; + this.filters = response; this.onFiltersChanged.next(this.filters); resolve(this.filters); }, reject); @@ -121,7 +121,7 @@ export class MailService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/mail-labels') .subscribe((response: any) => { - this.labels = response.data; + this.labels = response; this.onLabelsChanged.next(this.labels); resolve(this.labels); }, reject); @@ -159,12 +159,12 @@ export class MailService implements Resolve this.http.get('api/mail-folders?handle=' + handle) .subscribe((folders: any) => { - const folderId = folders.data[0].id; + const folderId = folders[0].id; this.http.get('api/mail-mails?folder=' + folderId) .subscribe((mails: any) => { - this.mails = mails.data.map(mail => { + this.mails = mails.map(mail => { return new Mail(mail); }); @@ -191,7 +191,7 @@ export class MailService implements Resolve this.http.get('api/mail-mails?' + handle + '=true') .subscribe((mails: any) => { - this.mails = mails.data.map(mail => { + this.mails = mails.map(mail => { return new Mail(mail); }); @@ -216,12 +216,12 @@ export class MailService implements Resolve this.http.get('api/mail-labels?handle=' + handle) .subscribe((labels: any) => { - const labelId = labels.data[0].id; + const labelId = labels[0].id; this.http.get('api/mail-mails?labels=' + labelId) .subscribe((mails: any) => { - this.mails = mails.data.map(mail => { + this.mails = mails.map(mail => { return new Mail(mail); }); diff --git a/src/app/main/content/apps/scrumboard/scrumboard.service.ts b/src/app/main/content/apps/scrumboard/scrumboard.service.ts index b4221bab..3fd33c60 100644 --- a/src/app/main/content/apps/scrumboard/scrumboard.service.ts +++ b/src/app/main/content/apps/scrumboard/scrumboard.service.ts @@ -45,7 +45,7 @@ export class ScrumboardService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/scrumboard-boards') .subscribe((response: any) => { - this.boards = response.data; + this.boards = response; this.onBoardsChanged.next(this.boards); resolve(this.boards); }, reject); @@ -57,7 +57,7 @@ export class ScrumboardService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/scrumboard-boards/' + boardId) .subscribe((response: any) => { - this.board = response.data; + this.board = response; this.onBoardChanged.next(this.board); resolve(this.board); }, reject); diff --git a/src/app/main/content/apps/todo/todo.service.ts b/src/app/main/content/apps/todo/todo.service.ts index 087c7211..6c7d35ff 100644 --- a/src/app/main/content/apps/todo/todo.service.ts +++ b/src/app/main/content/apps/todo/todo.service.ts @@ -92,7 +92,7 @@ export class TodoService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/todo-filters') .subscribe((response: any) => { - this.filters = response.data; + this.filters = response; this.onFiltersChanged.next(this.filters); resolve(this.filters); }, reject); @@ -108,7 +108,7 @@ export class TodoService implements Resolve return new Promise((resolve, reject) => { this.http.get('api/todo-tags') .subscribe((response: any) => { - this.tags = response.data; + this.tags = response; this.onTagsChanged.next(this.tags); resolve(this.tags); }, reject); @@ -145,7 +145,7 @@ export class TodoService implements Resolve this.http.get('api/todo-todos') .subscribe((todos: any) => { - this.todos = todos.data.map(todo => { + this.todos = todos.map(todo => { return new Todo(todo); }); @@ -178,7 +178,7 @@ export class TodoService implements Resolve this.http.get('api/todo-todos?' + param) .subscribe((todos: any) => { - this.todos = todos.data.map(todo => { + this.todos = todos.map(todo => { return new Todo(todo); }); @@ -203,12 +203,12 @@ export class TodoService implements Resolve this.http.get('api/todo-tags?handle=' + handle) .subscribe((tags: any) => { - const tagId = tags.data[0].id; + const tagId = tags[0].id; this.http.get('api/todo-todos?tags=' + tagId) .subscribe((todos: any) => { - this.todos = todos.data.map(todo => { + this.todos = todos.map(todo => { return new Todo(todo); }); diff --git a/src/app/main/content/pages/invoices/invoice.service.ts b/src/app/main/content/pages/invoices/invoice.service.ts index a0644ad1..21ddb478 100644 --- a/src/app/main/content/pages/invoices/invoice.service.ts +++ b/src/app/main/content/pages/invoices/invoice.service.ts @@ -44,7 +44,7 @@ export class InvoiceService implements Resolve this.http.get('api/invoice') .subscribe((timeline: any) => { - this.invoice = timeline.data; + this.invoice = timeline; this.invoiceOnChanged.next(this.invoice); resolve(this.invoice); }, reject); diff --git a/src/app/main/content/pages/profile/profile.service.ts b/src/app/main/content/pages/profile/profile.service.ts index 828e4c78..d5019d8d 100644 --- a/src/app/main/content/pages/profile/profile.service.ts +++ b/src/app/main/content/pages/profile/profile.service.ts @@ -50,7 +50,7 @@ export class ProfileService implements Resolve this.http.get('api/profile-timeline') .subscribe((timeline: any) => { - this.timeline = timeline.data; + this.timeline = timeline; this.timelineOnChanged.next(this.timeline); resolve(this.timeline); }, reject); @@ -66,7 +66,7 @@ export class ProfileService implements Resolve this.http.get('api/profile-about') .subscribe((about: any) => { - this.about = about.data; + this.about = about; this.aboutOnChanged.next(this.about); resolve(this.about); }, reject); @@ -82,7 +82,7 @@ export class ProfileService implements Resolve this.http.get('api/profile-photos-videos') .subscribe((photosVideos: any) => { - this.photosVideos = photosVideos.data; + this.photosVideos = photosVideos; this.photosVideosOnChanged.next(this.photosVideos); resolve(this.photosVideos); }, reject); diff --git a/src/app/main/content/pages/search/search.service.ts b/src/app/main/content/pages/search/search.service.ts index 1f12303a..5e58f53a 100644 --- a/src/app/main/content/pages/search/search.service.ts +++ b/src/app/main/content/pages/search/search.service.ts @@ -47,7 +47,7 @@ export class SearchService implements Resolve this.http.get('api/search-classic') .subscribe((classic: any) => { - this.classic = classic.data; + this.classic = classic; this.classicOnChanged.next(this.classic); resolve(this.classic); }, reject); @@ -63,7 +63,7 @@ export class SearchService implements Resolve this.http.get('api/search-table') .subscribe((table: any) => { - this.table = table.data; + this.table = table; this.tableOnChanged.next(this.table); resolve(this.table); }, reject);