From 483e64ffe33e1587b941b80b4bbb583ccd58481d Mon Sep 17 00:00:00 2001 From: Bright Date: Wed, 27 Nov 2024 13:43:01 +0700 Subject: [PATCH] =?UTF-8?q?sort=20=E0=B9=80=E0=B8=A3=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=87=E0=B8=88=E0=B8=B2=E0=B8=81=E0=B8=A7=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/PortfolioController.ts | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/controllers/PortfolioController.ts b/src/controllers/PortfolioController.ts index c690fa1..d027420 100644 --- a/src/controllers/PortfolioController.ts +++ b/src/controllers/PortfolioController.ts @@ -54,32 +54,8 @@ export class PortfolioController extends Controller { "createdFullName", "lastUpdateFullName", ], - order: { name: "ASC" }, + order: { createdAt: "DESC" }, }); - - // const _portfolio = await this.portfolioRepository - // .createQueryBuilder("portfolio") - // .select([ - // "portfolio.id", - // "portfolio.name", - // "portfolio.detail", - // "portfolio.createdAt", - // "portfolio.lastUpdatedAt", - // "portfolio.createdFullName", - // "portfolio.lastUpdateFullName", - // ]) - // .where("portfolio.createdUserId = :userId", { userId: request.user.sub }) - // .andWhere( - // new Brackets((qb) => { - // qb.where(keyword != null && keyword != "" ? "portfolio.name LIKE :keyword" : "1=1", { - // keyword: `%${keyword}%`, - // }).orWhere(keyword != null && keyword != "" ? "portfolio.detail LIKE :keyword" : "1=1", { - // keyword: `%${keyword}%`, - // }); - // }), - // ) - // .getMany(); - return new HttpSuccess(_portfolio); }