@armi-wave/common 1.23.30 → 1.23.31
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.
|
@@ -58,8 +58,8 @@ const textPostDownvoteSchema = new mongoose_1.Schema({
|
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
});
|
|
61
|
-
// Ensure a user cannot
|
|
62
|
-
textPostDownvoteSchema.index({ userId: 1,
|
|
61
|
+
// Ensure a user cannot downvote the same post multiple times
|
|
62
|
+
textPostDownvoteSchema.index({ userId: 1, textPostId: 1 }, { unique: true });
|
|
63
63
|
// Create and export the model
|
|
64
64
|
const TextPostDownvote = mongoose_1.default.model('TextPostDownvote', textPostDownvoteSchema);
|
|
65
65
|
exports.default = TextPostDownvote;
|
|
@@ -59,7 +59,7 @@ const textPostUpvoteSchema = new mongoose_1.Schema({
|
|
|
59
59
|
},
|
|
60
60
|
});
|
|
61
61
|
// Ensure a user cannot upvote the same post multiple times
|
|
62
|
-
textPostUpvoteSchema.index({ userId: 1,
|
|
62
|
+
textPostUpvoteSchema.index({ userId: 1, textPostId: 1 }, { unique: true });
|
|
63
63
|
// Create and export the model
|
|
64
64
|
const TextPostUpvote = mongoose_1.default.model('TextPostUpvote', textPostUpvoteSchema);
|
|
65
65
|
exports.default = TextPostUpvote;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@armi-wave/common",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.31",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"build": "tsc",
|
|
13
13
|
"clean": "del ./build/*",
|
|
14
|
-
"
|
|
14
|
+
"pub2": "git add . && git commit -m \"Updates\" && npm version feature && npm run build && npm publish",
|
|
15
|
+
"pub": "npm run build && npm publish"
|
|
15
16
|
},
|
|
16
17
|
"author": "Armiron Kurbalaj",
|
|
17
18
|
"license": "ISC",
|