src/app/common/mongoose/paginate.plugin.ts
Function paginatePlugin
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function paginatePlugin<EnforcedDocType, TModelType, TInstanceMethods>(
schema: Schema<EnforcedDocType, TModelType, TInstanceMethods>
) {
schema.query['paginate'] = async function <DocType>(
this: Query<HydratedDocument<DocType>[], DocType>,