From f4f775b5ea001c87ead7f5b3261d87c0091de7f3 Mon Sep 17 00:00:00 2001 From: harid Date: Fri, 14 Nov 2025 17:33:37 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B9=80=E0=B8=A3=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=87=E0=B8=A5=E0=B8=B3=E0=B8=94=E0=B8=B1=E0=B8=9A=E0=B8=82?= =?UTF-8?q?=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B8=AB=E0=B8=A5?= =?UTF-8?q?=E0=B8=B1=E0=B8=81=20#1991?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/MainController.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controllers/MainController.ts b/src/controllers/MainController.ts index 0556570b..744c2c8f 100644 --- a/src/controllers/MainController.ts +++ b/src/controllers/MainController.ts @@ -36,14 +36,14 @@ export class MainController extends Controller { */ @Get("main/person") async getMainPerson() { - const bloodGroups = await this.bloodGroupRepo.find(); - const genders = await this.genderRepo.find(); - const prefixs = await this.prefixeRepo.find(); - 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(); + const bloodGroups = await this.bloodGroupRepo.find({order: { name: "ASC" }}); + const genders = await this.genderRepo.find({order: { name: "ASC" }}); + const prefixs = await this.prefixeRepo.find({order: { name: "ASC" }}); + const relationships = await this.relationshipRepo.find({order: { name: "ASC" }}); + const religions = await this.religionRepo.find({order: { name: "ASC" }}); + const rank = await this.rankRepo.find({order: { name: "ASC" }}); + const educationLevels = await this.educationLevelRepo.find({order: { rank: "ASC" }}); + const provinces = await this.provinceRepo.find({order: { name: "ASC" }}); return new HttpSuccess({ bloodGroups, From 12f05e5ec3b99deb04de419b30c184bf7b14d3f0 Mon Sep 17 00:00:00 2001 From: harid Date: Mon, 17 Nov 2025 11:13:49 +0700 Subject: [PATCH 2/2] revert (fix view error) --- src/database/data-source.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/database/data-source.ts b/src/database/data-source.ts index 9de306d7..db5afc0d 100644 --- a/src/database/data-source.ts +++ b/src/database/data-source.ts @@ -47,7 +47,9 @@ export const AppDataSource = new DataSource({ logging: true, // timezone: "Z", entities: - process.env.NODE_ENV !== "production" ? ["src/entities/*.ts"] : ["dist/entities/*{.ts,.js}"], + process.env.NODE_ENV !== "production" + ? ["src/entities/**/*.ts"] + : ["dist/entities/**/*{.ts,.js}"], migrations: process.env.NODE_ENV !== "production" ? ["src/migration/**/*.ts"]