Merge branch 'net-dav' into develop
This commit is contained in:
commit
21699284db
1 changed files with 17 additions and 3 deletions
|
|
@ -69,7 +69,14 @@ export class ProfileInformationController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async detailProfileInformation(@Path() profileId: string) {
|
public async detailProfileInformation(@Path() profileId: string) {
|
||||||
const getProfileInformation = await this.profileInformationRepo.findBy({ profileId });
|
const getProfileInformation = await this.profileInformationRepo.findOne({
|
||||||
|
relations: {
|
||||||
|
bloodGroup: true,
|
||||||
|
relationship: true,
|
||||||
|
gender: true,
|
||||||
|
},
|
||||||
|
where: { profileId },
|
||||||
|
});
|
||||||
if (!getProfileInformation) {
|
if (!getProfileInformation) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||||
}
|
}
|
||||||
|
|
@ -106,8 +113,15 @@ export class ProfileInformationController extends Controller {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
public async getProfileInformationHistory(@Path() informationId: string) {
|
public async getProfileInformationHistory(@Path() informationId: string) {
|
||||||
const record = await this.profileInformationHistoryRepo.findBy({
|
const record = await this.profileInformationHistoryRepo.find({
|
||||||
profileInformationId: informationId,
|
relations: {
|
||||||
|
bloodGroup: true,
|
||||||
|
relationship: true,
|
||||||
|
gender: true,
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
profileInformationId: informationId,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
if (!record) {
|
if (!record) {
|
||||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue