summary refs log tree commit diff
path: root/src/models/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/index.ts')
-rw-r--r--src/models/index.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/models/index.ts b/src/models/index.ts

index 03b9fe70..876e5984 100644 --- a/src/models/index.ts +++ b/src/models/index.ts
@@ -1,5 +1,8 @@ import mongoose from "mongoose"; import { Schema } from "mongoose"; +import mongooseAutoPopulate from "mongoose-autopopulate"; + +mongoose.plugin(mongooseAutoPopulate); mongoose.plugin((schema: Schema, opts: any) => { schema.set("toObject", {