@riocrypto/common 1.0.412 → 1.0.414

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.
@@ -133,6 +133,7 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
133
133
  ((_g = req.cookies) === null || _g === void 0 ? void 0 : _g.jwt)) {
134
134
  throw new missing_user_error_1.MissingUserError();
135
135
  }
136
+ console.log("throwing");
136
137
  throw new not_authorized_error_1.NotAuthorizedError();
137
138
  }
138
139
  next();
@@ -29,7 +29,7 @@ const buildBankPayout = (mongoose) => {
29
29
  }, {
30
30
  toJSON: {
31
31
  transform(doc, ret) {
32
- ret.id = ret._id;
32
+ ret.id = ret._id.valueOf();
33
33
  delete ret._id;
34
34
  delete ret.__v;
35
35
  },
@@ -93,7 +93,7 @@ const buildBusinessUser = (mongoose) => {
93
93
  }, {
94
94
  toJSON: {
95
95
  transform(doc, ret) {
96
- ret.id = ret._id;
96
+ ret.id = ret._id.valueOf();
97
97
  delete ret._id;
98
98
  delete ret.__v;
99
99
  },
@@ -108,7 +108,7 @@ const buildOrder = (mongoose) => {
108
108
  }, {
109
109
  toJSON: {
110
110
  transform(doc, ret) {
111
- ret.id = ret._id;
111
+ ret.id = ret._id.valueOf();
112
112
  delete ret._id;
113
113
  delete ret.__v;
114
114
  },
@@ -47,7 +47,7 @@ const buildPartner = (mongoose) => {
47
47
  }, {
48
48
  toJSON: {
49
49
  transform(doc, ret) {
50
- ret.id = ret._id;
50
+ ret.id = ret._id.valueOf();
51
51
  delete ret._id;
52
52
  delete ret.__v;
53
53
  ret.apiKeys.forEach((apiKey) => {
@@ -75,7 +75,7 @@ const buildUser = (mongoose) => {
75
75
  }, {
76
76
  toJSON: {
77
77
  transform(doc, ret) {
78
- ret.id = ret._id;
78
+ ret.id = ret._id.valueOf();
79
79
  delete ret._id;
80
80
  delete ret.__v;
81
81
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.412",
3
+ "version": "1.0.414",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",