From 4dbef45d2c18915818a662d3c7581987ea8feac2 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:35:18 +0700 Subject: [PATCH] feat: add relation query --- src/controllers/ProfileController.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index da348115..76b226c2 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -204,6 +204,10 @@ export class ProfileController extends Controller { @Get("{id}") async detailProfile(@Path() id: string) { const profile = await this.profileRepository.findOne({ + relations: { + posLevel: true, + posType: true, + }, where: { id }, select: [ "id",