diff --git a/src/controllers/user.ts b/src/controllers/user.ts index 417d989..9ce350d 100644 --- a/src/controllers/user.ts +++ b/src/controllers/user.ts @@ -1,5 +1,5 @@ import axios from "axios"; -import { HrmsEmployee, Paging, User, UserRefreshToken, UserRole, UserToRoom } from "entity"; +import { HospitalInformation, HrmsEmployee, Paging, User, UserRefreshToken, UserRole, UserToRoom } from "entity"; import exceljs from "exceljs"; import { NextFunction, Response } from "express"; import { Request } from "express-jwt"; @@ -1139,6 +1139,9 @@ export class UserController { // .where('utr.user_id = :id', { id: param.id }) // .getMany(); + const repoHospital = OrmHelper.DB.getRepository(HospitalInformation); + const hospital = await repoHospital.findOne({}); + if (detail != null) { const data = { ...detail, @@ -1146,6 +1149,7 @@ export class UserController { file_signature: detail.signature ? buildFileUrl(detail.signature) : null, profile: detail.profile_picture ?? null, profile_picture: detail.profile_picture ? buildFileUrl(detail.profile_picture) : null, + hospital: hospital, }; return ReturnHelper.successResponseAny(res, 200, Language.lang.success_view, data);