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,