From bb4eda5a6da8935b79c5a0dde5a967d3a2cdf36d Mon Sep 17 00:00:00 2001 From: kittapath Date: Mon, 20 Jan 2025 22:54:41 +0700 Subject: [PATCH] add profileType --- src/controllers/ProfileController.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 11ee6ca7..f9164a43 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -5094,7 +5094,8 @@ export class ProfileController extends Controller { prefix: profile.prefix, rank: profile.rank, avatar: profile.avatar, - isDirector: profile.current_holders[0]?.isDirector ?? null, + profileType: "EMPLOYEE", + isDirector: posMaster?.isDirector || false, isProbation: profile.isProbation, avatarName: profile.avatarName, firstName: profile.firstName, @@ -5239,6 +5240,7 @@ export class ProfileController extends Controller { prefix: profile.prefix, rank: profile.rank, avatar: profile.avatar, + profileType: "OFFICER", isDirector: posMaster?.isDirector || false, isProbation: profile.isProbation, avatarName: profile.avatarName, @@ -6235,7 +6237,7 @@ export class ProfileController extends Controller { profile && profile.profileEducations.length > 0 ? `${profile.profileEducations[0].degree ?? ""} ${profile.profileEducations[0].field ?? ""}` : "", - dateAppoint: profile.dateAppoint + dateAppoint: profile.dateAppoint, }; if (_profile.child4Id != null) {