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

Commit

Permalink
Query for invitation code by email #264
Browse files Browse the repository at this point in the history
  • Loading branch information
appinteractive authored and roschaefer committed Sep 20, 2018
1 parent 89f3db6 commit 34a3343
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/models/invites.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
module.exports = function (app) {
const mongooseClient = app.get('mongooseClient');
const invites = new mongooseClient.Schema({
email: { type: String, required: true, unique: true },
code: { type: String, required: true },
email: { type: String, required: true, index: true, unique: true },
code: { type: String, index: true, required: true },
role: {
type: String,
enum: ['admin', 'moderator', 'manager', 'editor', 'user'],
Expand All @@ -15,7 +15,7 @@ module.exports = function (app) {
invitedByUserId: { type: String },
language: { type: String },
badgeIds: [],
wasUsed: { type: Boolean },
wasUsed: { type: Boolean, index: true },
createdAt: { type: Date, default: Date.now },
wasSeeded: { type: Boolean }
});
Expand Down

0 comments on commit 34a3343

Please # to comment.