add api portfolio/user
This commit is contained in:
parent
bb6364e7c0
commit
101eabbac0
1 changed files with 24 additions and 0 deletions
|
|
@ -59,6 +59,30 @@ export class PortfolioController extends Controller {
|
||||||
return new HttpSuccess(_portfolio);
|
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 รายละเอียดรายการผลงาน
|
* API รายละเอียดรายการผลงาน
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue