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); }