Skip to content

Commit

Permalink
feat(FormSchema): Document new indexes for form dashboard (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
liangyuanruo authored Aug 5, 2020
1 parent ed6b3e0 commit 21b83da
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/models/form.server.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,16 @@ const compileFormModel = (db: Mongoose): IFormModel => {
title: 'text',
})

FormSchema.index({
'permissionList.email': 1,
lastModified: -1,
})

FormSchema.index({
admin: 1,
lastModified: -1,
})

const FormModel = db.model<IFormSchema, IFormModel>(
FORM_SCHEMA_ID,
FormSchema,
Expand Down

0 comments on commit 21b83da

Please sign in to comment.