aravindnc/mongoose-aggregate-paginate-v2

Global options config

Closed this issue · 3 comments

The global settings feature is broken, i can't access aggregatePaginate object.

index.js should contain module.exports.aggregatePaginate = aggregatePaginate; to fix it

Spown commented

can confirm. also, conventionally plugin config occurs before schema is sent to produce the model.

schema.plugin(aggregatePaginate({...config: here}));
model = db.model('name', schema)

+1

Any workaround available?

Fixed in new version.