@azteam/express 1.2.178 → 1.2.181
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.
|
|
3
|
+
"version": "1.2.181",
|
|
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.
|
|
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",
|
package/src/AdminController.js
CHANGED
|
@@ -190,14 +190,14 @@ class AdminController extends Controller {
|
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
methodPostImportSheet = async (req, res) => {
|
|
194
194
|
return res.success(true);
|
|
195
195
|
};
|
|
196
196
|
postImportSheet() {
|
|
197
197
|
return {
|
|
198
198
|
disabled: !this.roles.CREATE,
|
|
199
|
-
path: '/',
|
|
200
|
-
method: [adminRoleMiddleware([this.roles.CREATE]), verifyGoogleAppMiddleware(), this.
|
|
199
|
+
path: '/import_sheet',
|
|
200
|
+
method: [adminRoleMiddleware([this.roles.CREATE]), verifyGoogleAppMiddleware(), this.methodPostImportSheet],
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
203
|
|
|
@@ -207,7 +207,7 @@ class AdminController extends Controller {
|
|
|
207
207
|
postExportSheet() {
|
|
208
208
|
return {
|
|
209
209
|
disabled: !this.roles.READ,
|
|
210
|
-
path: '/',
|
|
210
|
+
path: '/export_sheet',
|
|
211
211
|
method: [adminRoleMiddleware([this.roles.READ]), verifyGoogleAppMiddleware(), this.methodPostExportSheet],
|
|
212
212
|
};
|
|
213
213
|
}
|
|
@@ -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.
|
|
6
|
+
if (!req.user.google_api_credential) {
|
|
7
7
|
return next(new ErrorException(USER_NOT_VERIFIED));
|
|
8
8
|
}
|
|
9
|
-
req.user.
|
|
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
|
};
|