sort เรียงจากวันที่สร้าง
This commit is contained in:
parent
786da60910
commit
483e64ffe3
1 changed files with 1 additions and 25 deletions
|
|
@ -54,32 +54,8 @@ export class PortfolioController extends Controller {
|
||||||
"createdFullName",
|
"createdFullName",
|
||||||
"lastUpdateFullName",
|
"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);
|
return new HttpSuccess(_portfolio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue