update api.js

This commit is contained in:
helloworld 2022-12-24 19:23:46 +08:00
parent e8bc9625af
commit 48a22e5d2e
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ module.exports = class extends Base {
} }
try { try {
let data = await this.model(tableName).where(condition).page(this.get('page') || 1, this.get('pageSize') || 20).countSelect(); let data = await this.model(tableName).where(condition).order('createdAt DESC').page(this.get('page') || 1, this.get('pageSize') || 20).countSelect();
if (tableName == "bookmarks") { if (tableName == "bookmarks") {
let ids = []; let ids = [];
for (let bookmark of data.data) { for (let bookmark of data.data) {