Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 37fea2d

Browse files
Query for invitation code by email #264
1 parent 742dbab commit 37fea2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/models/invites.model.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
module.exports = function (app) {
66
const mongooseClient = app.get('mongooseClient');
77
const invites = new mongooseClient.Schema({
8-
email: { type: String, required: true, unique: true },
9-
code: { type: String, required: true },
8+
email: { type: String, required: true, index: true, unique: true },
9+
code: { type: String, index: true, required: true },
1010
role: {
1111
type: String,
1212
enum: ['admin', 'moderator', 'manager', 'editor', 'user'],
@@ -15,7 +15,7 @@ module.exports = function (app) {
1515
invitedByUserId: { type: String },
1616
language: { type: String },
1717
badgeIds: [],
18-
wasUsed: { type: Boolean },
18+
wasUsed: { type: Boolean, index: true },
1919
createdAt: { type: Date, default: Date.now },
2020
wasSeeded: { type: Boolean }
2121
});

0 commit comments

Comments
 (0)