@chevre/domain 26.1.0-alpha.5 → 26.1.0-alpha.6

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.
@@ -17,25 +17,12 @@ class CredentialsRepo {
17
17
  // expireInSeconds:0に設定すれば保管しない
18
18
  return;
19
19
  }
20
- // const { access_token, expired_at } = credentials;
21
20
  if (typeof credentials.access_token !== 'string') {
22
21
  throw new Error('access_token must be string');
23
22
  }
24
- // if (typeof credentials.expired_at !== 'string') {
25
- // throw new Error('expired_at must be string');
26
- // }
27
23
  const key = this.createKey();
28
24
  const value = JSON.stringify(credentials);
29
- const multi = this.redisClient.multi();
30
- await multi.set(key, value)
31
- // .expireAt(key, Number(expired_at))
32
- .expire(key, this.options.expireInSeconds)
33
- .exec();
34
- // if (Array.isArray(results) && (results[0] === 1 || (<any>results)[0] === true)) {
35
- // return true;
36
- // } else {
37
- // throw new Error('unexpected');
38
- // }
25
+ await this.redisClient.set(key, value, { EX: this.options.expireInSeconds });
39
26
  }
40
27
  async find() {
41
28
  const key = this.createKey();
package/package.json CHANGED
@@ -88,5 +88,5 @@
88
88
  "postversion": "git push origin --tags",
89
89
  "prepublishOnly": "npm run clean && npm run build"
90
90
  },
91
- "version": "26.1.0-alpha.5"
91
+ "version": "26.1.0-alpha.6"
92
92
  }