@azteam/express 1.2.179 → 1.2.180
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
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
199
|
path: '/import_sheet',
|
|
200
|
-
method: [adminRoleMiddleware([this.roles.CREATE]), verifyGoogleAppMiddleware(), this.
|
|
200
|
+
method: [adminRoleMiddleware([this.roles.CREATE]), verifyGoogleAppMiddleware(), this.methodPostImportSheet],
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
203
|
|
|
@@ -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
|
};
|