flykup_model_production 1.0.17 → 1.0.18
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/models/follow.model.js +4 -4
- package/package.json +1 -1
package/models/follow.model.js
CHANGED
|
@@ -17,11 +17,11 @@ const FollowSchema = new mongoose.Schema(
|
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
// Prevent duplicate follows
|
|
20
|
-
FollowSchema.index({ follower: 1, following: 1 }, { unique: true });
|
|
20
|
+
// FollowSchema.index({ follower: 1, following: 1 }, { unique: true });
|
|
21
21
|
|
|
22
|
-
// Add helpful indexes for efficient querying
|
|
23
|
-
FollowSchema.index({ follower: 1 });
|
|
24
|
-
FollowSchema.index({ following: 1 });
|
|
22
|
+
// // Add helpful indexes for efficient querying
|
|
23
|
+
// FollowSchema.index({ follower: 1 });
|
|
24
|
+
// FollowSchema.index({ following: 1 });
|
|
25
25
|
|
|
26
26
|
FollowSchema.pre('save', function(next) {
|
|
27
27
|
if (this.follower.equals(this.following)) {
|