no message

This commit is contained in:
Kittapath 2024-06-11 16:13:51 +07:00
parent d78391e1ee
commit afa7c95a01
2 changed files with 33 additions and 9 deletions

View file

@ -496,15 +496,27 @@ export class ProfileController extends Controller {
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
const _caregiver = await this.profileRepo.find({
relations: { posLevel: true, posType: true },
});
const _commander = await this.profileRepo.find({
relations: { posLevel: true, posType: true },
});
const _chairman = await this.profileRepo.find({
relations: { posLevel: true, posType: true },
});
const _caregiver = await this.profileRepo
.createQueryBuilder("profile")
.leftJoinAndSelect("profile.posLevel", "posLevel")
.leftJoinAndSelect("profile.posType", "posType")
.skip((1 - 1) * 20)
.take(20)
.getMany();
const _commander = await this.profileRepo
.createQueryBuilder("profile")
.leftJoinAndSelect("profile.posLevel", "posLevel")
.leftJoinAndSelect("profile.posType", "posType")
.skip((1 - 1) * 20)
.take(20)
.getMany();
const _chairman = await this.profileRepo
.createQueryBuilder("profile")
.leftJoinAndSelect("profile.posLevel", "posLevel")
.leftJoinAndSelect("profile.posType", "posType")
.skip((1 - 1) * 20)
.take(20)
.getMany();
const caregiver = _caregiver.map((_data) => ({
id: _data.id,