Skip to content

Commit

Permalink
Merge pull request #815 from idurar/dev
Browse files Browse the repository at this point in the history
3.0.0-beta.14
  • Loading branch information
salahlalami authored Nov 17, 2023
2 parents e53cf35 + 8848751 commit 1d78891
Show file tree
Hide file tree
Showing 11 changed files with 232 additions and 2,538 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const paginatedList = async (req, res) => {
.sort({ created: 'desc' })
.populate('createdBy', 'name');
// Counting the total documents
const countPromise = Model.count({ removed: false });
const countPromise = Model.countDocuments({ removed: false });
// Resolving both promises
const [result, count] = await Promise.all([resultsPromise, countPromise]);
// Calculating total pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const paginatedList = async (req, res) => {
.sort({ created: 'desc' })
.populate('createdBy', 'name');
// Counting the total documents
const countPromise = Model.count({ removed: false });
const countPromise = Model.countDocuments({ removed: false });
// Resolving both promises
const [result, count] = await Promise.all([resultsPromise, countPromise]);
// Calculating total pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const paginatedList = async (req, res) => {
.sort({ created: 'desc' })
.populate('createdBy', 'name');
// Counting the total documents
const countPromise = Model.count({ removed: false });
const countPromise = Model.countDocuments({ removed: false });
// Resolving both promises
const [result, count] = await Promise.all([resultsPromise, countPromise]);
// Calculating total pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const paginatedList = async (Model, req, res) => {
.sort({ created: 'desc' })
.populate();
// Counting the total documents
const countPromise = Model.count({ removed: false });
const countPromise = Model.countDocuments({ removed: false });
// Resolving both promises
const [result, count] = await Promise.all([resultsPromise, countPromise]);
// Calculating total pages
Expand Down
1 change: 0 additions & 1 deletion backend/models/appModels/Payment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const mongoose = require('mongoose');
const AutoIncrement = require('mongoose-sequence')(mongoose);
mongoose.Promise = global.Promise;

const paymentSchema = new mongoose.Schema({
Expand Down
Loading

0 comments on commit 1d78891

Please sign in to comment.