แก้สมัครสอบ
This commit is contained in:
parent
8e120660a1
commit
325c45592d
1 changed files with 16 additions and 1 deletions
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue