feat(Admin): add pagination support for getMany organization route

This commit is contained in:
Matthieu Bessat 2020-08-16 11:29:22 +02:00
parent db2414b8b8
commit 3670a53f51
4 changed files with 53 additions and 2 deletions

View file

@ -1,5 +1,5 @@
import mongoose, { Schema } from 'mongoose'
import { Tag } from './Tag'
import mongoosePaginate from 'mongoose-paginate-v2'
interface AllowedStringOptions {
name: string;
@ -111,4 +111,6 @@ const Organization = new Schema({
publishedAt: { type: Date },
})
Organization.plugin(mongoosePaginate)
export default mongoose.model('Organization', Organization)