@go-mailer/jarvis 10.1.4 → 10.2.0

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.
@@ -9,7 +9,7 @@ const HTTPCacheManager = () => {
9
9
  const cached_records = await repo
10
10
  .search()
11
11
  .where("tenant_id")
12
- .equals(tenant_id)
12
+ .equals(Number(tenant_id))
13
13
  .where("resource")
14
14
  .equals(cache_resource)
15
15
  .returnAll();
@@ -27,7 +27,7 @@ const HTTPCacheManager = () => {
27
27
  let cached_record = await repo
28
28
  .search()
29
29
  .where("tenant_id")
30
- .equals(tenant_id)
30
+ .equals(Number(tenant_id))
31
31
  .where("key")
32
32
  .equals(cache_key)
33
33
  .returnFirst();
@@ -51,13 +51,13 @@ const HTTPCacheManager = () => {
51
51
  let cached_record = await repo
52
52
  .search()
53
53
  .where("tenant_id")
54
- .equals(tenant_id)
54
+ .equals(Number(tenant_id))
55
55
  .where("key")
56
56
  .equals(cache_key)
57
57
  .returnFirst();
58
58
 
59
59
  const data_to_cache = {
60
- tenant_id,
60
+ tenant_id: Number(tenant_id),
61
61
  key: cache_key,
62
62
  resource: cache_resource,
63
63
  data: JSON.stringify(payload),
@@ -75,7 +75,7 @@ const HTTPCacheManager = () => {
75
75
  };
76
76
 
77
77
  const setup = (request, __, next) => {
78
- const { _parsedUrl } = request;
78
+ const { _parsedUrl, body } = request;
79
79
  const resource = _parsedUrl.pathname.split("/")[1];
80
80
  request.cache_key = request.originalUrl + "&" + JSON.stringify(body);
81
81
  request.cache_resource = resource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-mailer/jarvis",
3
- "version": "10.1.4",
3
+ "version": "10.2.0",
4
4
  "main": "index.js",
5
5
  "repository": "git@github.com:go-mailer-ltd/jarvis-node.git",
6
6
  "author": "Nathan Oguntuberu <nateoguns.work@gmail.com>",