abler-api 0.1.11 → 0.1.14

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.
@@ -530,7 +530,9 @@ class apiUtil$1 {
530
530
 
531
531
  static async checkRequestToken(req) {
532
532
  req.accessToken = req.accessToken || apiUtil$1.extractToken(req);
533
- await apiUtil$1.restoreTokenData(apiUtil$1.userTokenStoreKey(req.accessToken), apiUtil$1.tokenExpireTime(req)).then(async function (data) {
533
+ const tokenKey = apiUtil$1.userTokenStoreKey(req.accessToken);
534
+ const expireTime = apiUtil$1.tokenExpireTime(req);
535
+ await apiUtil$1.restoreTokenData(tokenKey, expireTime).then(async function (data) {
534
536
  req.userInfo = apiUtil$1.setUserIdNo(data, data._idNo);
535
537
  if (req.tokenValidater) await req.tokenValidater(req.userInfo, req);
536
538
  return true;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "abler-api",
3
- "version": "0.1.11",
3
+ "version": "0.1.14",
4
4
  "description": "API服务相关工具",
5
5
  "main": "./dist/cjs/pp-util.js",
6
- "module": "./dist/es/pp-util.js",
6
+ "-module": "./dist/es/pp-util.js",
7
7
  "scripts": {
8
8
  "build": "npx rollup -c rollup.config.js",
9
9
  "test": "echo \"Error: no test specified\" && exit 1"