Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m0s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m0s
This commit is contained in:
commit
1e32478f3c
1 changed files with 8 additions and 0 deletions
|
|
@ -10,6 +10,8 @@ import { Religion } from "../entities/Religion";
|
||||||
import { Rank } from "../entities/Rank";
|
import { Rank } from "../entities/Rank";
|
||||||
import { EducationLevel } from "../entities/EducationLevel";
|
import { EducationLevel } from "../entities/EducationLevel";
|
||||||
import { Province } from "../entities/Province";
|
import { Province } from "../entities/Province";
|
||||||
|
import { District } from "../entities/District";
|
||||||
|
import { SubDistrict } from "../entities/SubDistrict";
|
||||||
|
|
||||||
@Route("api/v1/org/metadata")
|
@Route("api/v1/org/metadata")
|
||||||
@Tags("Profile")
|
@Tags("Profile")
|
||||||
|
|
@ -28,6 +30,8 @@ export class MainController extends Controller {
|
||||||
private rankRepo = AppDataSource.getRepository(Rank);
|
private rankRepo = AppDataSource.getRepository(Rank);
|
||||||
private educationLevelRepo = AppDataSource.getRepository(EducationLevel);
|
private educationLevelRepo = AppDataSource.getRepository(EducationLevel);
|
||||||
private provinceRepo = AppDataSource.getRepository(Province);
|
private provinceRepo = AppDataSource.getRepository(Province);
|
||||||
|
private districtRepo = AppDataSource.getRepository(District);
|
||||||
|
private subDistrictRepo = AppDataSource.getRepository(SubDistrict);
|
||||||
/**
|
/**
|
||||||
* API ข้อมูลหลัก
|
* API ข้อมูลหลัก
|
||||||
*
|
*
|
||||||
|
|
@ -44,6 +48,8 @@ export class MainController extends Controller {
|
||||||
const rank = await this.rankRepo.find({order: { name: "ASC" }});
|
const rank = await this.rankRepo.find({order: { name: "ASC" }});
|
||||||
const educationLevels = await this.educationLevelRepo.find({order: { rank: "ASC" }});
|
const educationLevels = await this.educationLevelRepo.find({order: { rank: "ASC" }});
|
||||||
const provinces = await this.provinceRepo.find({order: { name: "ASC" }});
|
const provinces = await this.provinceRepo.find({order: { name: "ASC" }});
|
||||||
|
const districts = await this.districtRepo.find({order: { name: "ASC" }});
|
||||||
|
const subDistricts = await this.subDistrictRepo.find({order: { name: "ASC" }});
|
||||||
|
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
bloodGroups,
|
bloodGroups,
|
||||||
|
|
@ -54,6 +60,8 @@ export class MainController extends Controller {
|
||||||
rank,
|
rank,
|
||||||
educationLevels,
|
educationLevels,
|
||||||
provinces,
|
provinces,
|
||||||
|
districts,
|
||||||
|
subDistricts,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue