@azteam/express 1.2.179 → 1.2.182

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azteam/express",
3
- "version": "1.2.179",
3
+ "version": "1.2.182",
4
4
  "main": "src/index.js",
5
5
  "engines": {
6
6
  "node": ">= 12.0.0",
@@ -9,7 +9,7 @@
9
9
  "author": "toda <sp.azsolution.net@gmail.com>",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@azteam/crypto": "1.0.23",
12
+ "@azteam/crypto": "1.0.24",
13
13
  "@azteam/error": "1.0.18",
14
14
  "@azteam/http-client": "1.0.93",
15
15
  "@grpc/grpc-js": "1.6.7",
@@ -190,25 +190,25 @@ class AdminController extends Controller {
190
190
  };
191
191
  }
192
192
 
193
- methodDPostImportSheet = async (req, res) => {
193
+ methodPostImportGoogleSheet = async (req, res) => {
194
194
  return res.success(true);
195
195
  };
196
- postImportSheet() {
196
+ postImportGoogleSheet() {
197
197
  return {
198
198
  disabled: !this.roles.CREATE,
199
- path: '/import_sheet',
200
- method: [adminRoleMiddleware([this.roles.CREATE]), verifyGoogleAppMiddleware(), this.methodDPostImportSheet],
199
+ path: '/import_google_sheet',
200
+ method: [adminRoleMiddleware([this.roles.CREATE]), verifyGoogleAppMiddleware(), this.methodPostImportGoogleSheet],
201
201
  };
202
202
  }
203
203
 
204
- methodPostExportSheet = async (req, res) => {
204
+ methodPostExportGoogleSheet = async (req, res) => {
205
205
  return res.success(true);
206
206
  };
207
- postExportSheet() {
207
+ postExportGoogleSheet() {
208
208
  return {
209
209
  disabled: !this.roles.READ,
210
- path: '/export_sheet',
211
- method: [adminRoleMiddleware([this.roles.READ]), verifyGoogleAppMiddleware(), this.methodPostExportSheet],
210
+ path: '/export_google_sheet',
211
+ method: [adminRoleMiddleware([this.roles.READ]), verifyGoogleAppMiddleware(), this.methodPostExportGoogleSheet],
212
212
  };
213
213
  }
214
214
  }
@@ -3,10 +3,10 @@ import {ErrorException, USER_NOT_VERIFIED} from '@azteam/error';
3
3
 
4
4
  export default function () {
5
5
  return async function (req, res, next) {
6
- if (!req.user.googleCredential) {
6
+ if (!req.user.google_api_credential) {
7
7
  return next(new ErrorException(USER_NOT_VERIFIED));
8
8
  }
9
- req.user.google_token = JSON.parse(decryptAES(req.user.googleCredential, process.env.SECRET_KEY));
9
+ req.user.google_api_credential = JSON.parse(decryptAES(req.user.google_api_credential, process.env.SECRET_KEY));
10
10
 
11
11
  return next();
12
12
  };