@armi-wave/common 1.23.15 → 1.23.16

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.
@@ -12,7 +12,6 @@ interface Comment extends Document {
12
12
  replyNr?: number;
13
13
  }
14
14
  interface CommentModel extends mongoose.Model<Comment> {
15
- build(attrs: Comment): Comment;
16
15
  }
17
16
  declare const Comment: CommentModel;
18
17
  export default Comment;
@@ -65,9 +65,6 @@ const commentSchema = new mongoose_1.Schema({
65
65
  },
66
66
  },
67
67
  });
68
- commentSchema.statics.build = (attrs) => {
69
- return new Comment(attrs);
70
- };
71
68
  commentSchema.index({ postId: 1 });
72
69
  const Comment = mongoose_1.default.model('Comment', commentSchema);
73
70
  exports.default = Comment;
@@ -13,7 +13,6 @@ interface Post extends Document {
13
13
  contentUrl: string;
14
14
  }
15
15
  interface PostModel extends Model<Post> {
16
- build(attrs: Post): Post;
17
16
  }
18
17
  declare const Post: PostModel;
19
18
  export default Post;
@@ -61,9 +61,6 @@ const postSchema = new mongoose_1.Schema({
61
61
  },
62
62
  },
63
63
  });
64
- postSchema.statics.build = (attrs) => {
65
- return new Post(attrs);
66
- };
67
64
  postSchema.index({ userId: 1 });
68
65
  const Post = mongoose_1.default.model('Post', postSchema);
69
66
  exports.default = Post;
@@ -11,7 +11,6 @@ interface Reply extends Document {
11
11
  reportsNr?: number;
12
12
  }
13
13
  interface ReplyModel extends mongoose.Model<Reply> {
14
- build(attrs: Reply): Reply;
15
14
  }
16
15
  declare const Reply: ReplyModel;
17
16
  export default Reply;
@@ -60,9 +60,6 @@ const replySchema = new mongoose_1.default.Schema({
60
60
  },
61
61
  },
62
62
  });
63
- replySchema.statics.build = (attrs) => {
64
- return new Reply(attrs);
65
- };
66
63
  replySchema.index({ commentId: 1 });
67
64
  const Reply = mongoose_1.default.model('Reply', replySchema);
68
65
  exports.default = Reply;
@@ -27,7 +27,6 @@ interface User extends Document {
27
27
  createdAt: Date;
28
28
  }
29
29
  interface UserModel extends Model<User> {
30
- build(attrs: User): User;
31
30
  }
32
31
  declare const User: UserModel;
33
32
  export default User;
@@ -101,9 +101,6 @@ userSchema.pre('save', function (done) {
101
101
  done();
102
102
  });
103
103
  });
104
- userSchema.statics.build = (attrs) => {
105
- return new User(attrs);
106
- };
107
104
  userSchema.index({ username: 1 }, { unique: true });
108
105
  const User = mongoose_1.default.model('User', userSchema);
109
106
  exports.default = User;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armi-wave/common",
3
- "version": "1.23.15",
3
+ "version": "1.23.16",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",