From 48a22e5d2ec9dde30f13bee25db80182db924e0b Mon Sep 17 00:00:00 2001 From: helloworld Date: Sat, 24 Dec 2022 19:23:46 +0800 Subject: [PATCH] update api.js --- src/controller/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/api.js b/src/controller/api.js index 184fba7..7e8b2f5 100644 --- a/src/controller/api.js +++ b/src/controller/api.js @@ -346,7 +346,7 @@ module.exports = class extends Base { } 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") { let ids = []; for (let bookmark of data.data) {