add api portfolio/user

This commit is contained in:
AdisakKanthawilang 2025-04-18 14:34:11 +07:00
parent bb6364e7c0
commit 101eabbac0

View file

@ -59,6 +59,30 @@ export class PortfolioController extends Controller {
return new HttpSuccess(_portfolio);
}
/**
* API list
*
* @summary list
*
*/
@Get("user")
async GetResultForEva(@Request() request: RequestWithUser) {
const _portfolio = await this.portfolioRepository.find({
where: { createdUserId: request.user.sub },
select: [
"id",
"name",
"detail",
"createdAt",
"lastUpdatedAt",
"createdFullName",
"lastUpdateFullName",
],
order: { createdAt: "DESC" },
});
return new HttpSuccess(_portfolio);
}
/**
* API
*