feat(Admin): add pagination support for getMany organization route
This commit is contained in:
parent
db2414b8b8
commit
3670a53f51
4 changed files with 53 additions and 2 deletions
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue