mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-25 10:13:08 +02:00
parent
2df2cf0983
commit
b44227948d
1 changed files with 1 additions and 0 deletions
|
@ -4,6 +4,7 @@ import db from '../db/mongodb';
|
||||||
const PollVote = db.get<IPollVote>('pollVotes');
|
const PollVote = db.get<IPollVote>('pollVotes');
|
||||||
PollVote.createIndex('userId');
|
PollVote.createIndex('userId');
|
||||||
PollVote.createIndex('noteId');
|
PollVote.createIndex('noteId');
|
||||||
|
PollVote.createIndex(['userId', 'noteId'], { unique: true });
|
||||||
export default PollVote;
|
export default PollVote;
|
||||||
|
|
||||||
export interface IPollVote {
|
export interface IPollVote {
|
||||||
|
|
Loading…
Reference in a new issue