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, + }); } }