From 325c45592d8dfd38731fcda97b8fc9bb3738c809 Mon Sep 17 00:00:00 2001 From: kittapath Date: Sun, 5 Jan 2025 21:57:37 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=AA=E0=B8=A1?= =?UTF-8?q?=E0=B8=B1=E0=B8=84=E0=B8=A3=E0=B8=AA=E0=B8=AD=E0=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/MainController.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/controllers/MainController.ts b/src/controllers/MainController.ts index 09485872..0556570b 100644 --- a/src/controllers/MainController.ts +++ b/src/controllers/MainController.ts @@ -8,6 +8,8 @@ import { Prefixe } from "../entities/Prefixe"; import { Relationship } from "../entities/Relationship"; import { Religion } from "../entities/Religion"; import { Rank } from "../entities/Rank"; +import { EducationLevel } from "../entities/EducationLevel"; +import { Province } from "../entities/Province"; @Route("api/v1/org/metadata") @Tags("Profile") @@ -24,6 +26,8 @@ export class MainController extends Controller { private relationshipRepo = AppDataSource.getRepository(Relationship); private religionRepo = AppDataSource.getRepository(Religion); private rankRepo = AppDataSource.getRepository(Rank); + private educationLevelRepo = AppDataSource.getRepository(EducationLevel); + private provinceRepo = AppDataSource.getRepository(Province); /** * API ข้อมูลหลัก * @@ -38,7 +42,18 @@ export class MainController extends Controller { const relationships = await this.relationshipRepo.find(); const religions = await this.religionRepo.find(); const rank = await this.rankRepo.find(); + const educationLevels = await this.educationLevelRepo.find(); + const provinces = await this.provinceRepo.find(); - return new HttpSuccess({ bloodGroups, genders, prefixs, relationships, religions, rank }); + return new HttpSuccess({ + bloodGroups, + genders, + prefixs, + relationships, + religions, + rank, + educationLevels, + provinces, + }); } }