@candlerip/shared3 0.0.121 → 0.0.122

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candlerip/shared3",
3
- "version": "0.0.121",
3
+ "version": "0.0.122",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.js",
@@ -1,7 +1,7 @@
1
1
  import * as mongoose from 'mongoose';
2
+ const ErrorLogSchema = new mongoose.Schema({
3
+ customError: { type: mongoose.Schema.Types.Mixed },
4
+ }, { timestamps: true, versionKey: false });
2
5
  export const getErrorLogModel = () => {
3
- const ErrorLogSchema = new mongoose.Schema({
4
- customError: { type: mongoose.Schema.Types.Mixed },
5
- }, { timestamps: true, versionKey: false });
6
6
  return mongoose.models?.errorLogs || mongoose.model('errorLogs', ErrorLogSchema);
7
7
  };
@@ -1,9 +1,9 @@
1
1
  import * as mongoose from 'mongoose';
2
+ const TranslationSchema = new mongoose.Schema({
3
+ id: { type: String },
4
+ en: { type: String },
5
+ hu: { type: String },
6
+ }, { timestamps: true, versionKey: false });
2
7
  export const getTranslationLogModel = () => {
3
- const TranslationSchema = new mongoose.Schema({
4
- id: { type: String },
5
- en: { type: String },
6
- hu: { type: String },
7
- }, { timestamps: true, versionKey: false });
8
8
  return mongoose.models?.translations || mongoose.model('translations', TranslationSchema);
9
9
  };
@@ -6,7 +6,7 @@ export const customErrorWorker = (info) => {
6
6
  return;
7
7
  }
8
8
  if (info?.err) {
9
- info.err = JSON.stringify(info.err);
9
+ info.err = JSON.stringify(info?.err, Object.getOwnPropertyNames(info?.err));
10
10
  }
11
11
  return info;
12
12
  };