const { PaginationParameters } = require("mongoose-paginate-v2");
const defaultPaginate = {
  page: 1,
  limit: 10,
};

export const optionsPaginate = (req) => {
  const paginate = new PaginationParameters(req).get();
  return [{}, { ...defaultPaginate, ...paginate[1] }];
};
