Asymmetrik/node-rest-starter

View on GitHub
src/app/common/mongoose/paginate.plugin.ts

Summary

Maintainability
A
1 hr
Test Coverage

Function paginatePlugin has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function paginatePlugin<EnforcedDocType, TModelType, TInstanceMethods>(
    schema: Schema<EnforcedDocType, TModelType, TInstanceMethods>
) {
    schema.query['paginate'] = async function <DocType>(
        this: Query<HydratedDocument<DocType>[], DocType>,
Severity: Minor
Found in src/app/common/mongoose/paginate.plugin.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status