pangea-server 1.0.65 → 1.0.66

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.
@@ -13,16 +13,22 @@ const validate_request_1 = require("../validator/validate-request");
13
13
  function callController(controller, validate, authConfig) {
14
14
  const { authMap, authCtor, accessToken } = authConfig;
15
15
  return async function (req, res) {
16
+ console.log('a');
16
17
  const headers = req.headers;
17
18
  const inputs = (0, validate_request_1.validateRequest)(validate, req);
18
19
  const ctx = { headers, ...inputs, file: req.file, files: req.files };
20
+ console.log('bb');
19
21
  const tx = await (0, database_1.getDbClient)().transaction();
20
22
  const db = new database_1.Db(tx);
23
+ console.log('ccc');
21
24
  try {
22
25
  const authUsers = await (0, authentication_1.getUsersFromToken)(headers.authorization, db, accessToken, authMap);
23
26
  const auth = new authCtor(authUsers);
27
+ console.log('dddd');
24
28
  const result = await controller(ctx, db, auth);
29
+ console.log('eeeee');
25
30
  await tx.commit();
31
+ console.log('ffff');
26
32
  let data = result;
27
33
  let totalCount;
28
34
  if (hasInstancesAndTotalCount(result)) {
@@ -34,9 +40,11 @@ function callController(controller, validate, authConfig) {
34
40
  totalCount: typeof totalCount === 'number' ? totalCount : null,
35
41
  successCode: (0, pangea_helpers_1.camelToUpperSnake)(controller.name),
36
42
  };
43
+ console.log('ggggggg');
37
44
  res.status(http_status_codes_1.StatusCodes.OK).json(jsonBody);
38
45
  }
39
46
  catch (err) {
47
+ console.log('error');
40
48
  await tx.rollback();
41
49
  throw err;
42
50
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-server",
3
3
  "description": "",
4
- "version": "1.0.65",
4
+ "version": "1.0.66",
5
5
  "files": [
6
6
  "dist"
7
7
  ],