@mxpicture/gcp-functions-frontend 0.1.24 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,20 +20,21 @@ export class FrontendApi extends IApi {
20
20
  await (await this.service())({ route: "delete", keys });
21
21
  }
22
22
  async get(keys) {
23
- return (await (await (await this.service())({ route: "get", keys })).data)
23
+ return (await (await this.service())({ route: "get", keys })).data
24
24
  .doc;
25
25
  }
26
26
  // todo add filter
27
27
  async query() {
28
- return (await (await (await this.service())({ route: "query" })).data)
28
+ return (await (await this.service())({ route: "query" })).data
29
29
  .doc;
30
30
  }
31
31
  async count() {
32
- return (await (await (await this.service())({ route: "count" })).data)
32
+ return (await (await this.service())({ route: "count" })).data
33
33
  .doc;
34
34
  }
35
35
  async exists(keys) {
36
- return (await (await (await this.service())({ route: "exists", keys })).data).doc;
36
+ return (await (await this.service())({ route: "exists", keys })).data
37
+ .doc;
37
38
  }
38
39
  async meta() {
39
40
  // return new Meta(this.shape).items();
@@ -41,13 +42,14 @@ export class FrontendApi extends IApi {
41
42
  return [];
42
43
  }
43
44
  async create(data) {
44
- return (await (await (await this.service())({ route: "create", content: data })).data).doc;
45
+ return (await (await this.service())({ route: "create", content: data }))
46
+ .data.doc;
45
47
  }
46
48
  async update(keys, data) {
47
- return (await (await (await this.service())({
49
+ return (await (await this.service())({
48
50
  route: "update",
49
51
  keys,
50
52
  content: data,
51
- })).data).doc;
53
+ })).data.doc;
52
54
  }
53
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mxpicture/gcp-functions-frontend",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "Utils for google cloud functions, publishing both CommonJS and ESM builds",
5
5
  "type": "module",
6
6
  "author": "MXPicture",