Compare commits
3 commits
ad9a7dcbb6
...
b0cfbc7036
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0cfbc7036 | ||
| 185aedc53f | |||
| 20c6c412b8 |
3 changed files with 12 additions and 13 deletions
|
|
@ -4312,11 +4312,8 @@ export class CommandController extends Controller {
|
|||
body.data.map(async (item) => {
|
||||
const profile = await this.profileRepository.findOne({
|
||||
where: { id: item.profileId },
|
||||
// relations: ["roleKeycloaks"],
|
||||
relations: {
|
||||
roleKeycloaks: true,
|
||||
posType: true,
|
||||
posLevel: true,
|
||||
roleKeycloaks: true
|
||||
},
|
||||
});
|
||||
if (!profile) {
|
||||
|
|
@ -4612,6 +4609,8 @@ export class CommandController extends Controller {
|
|||
await this.positionRepository.save(positionNew, { data: req });
|
||||
}
|
||||
await CreatePosMasterHistoryOfficer(posMaster.id, req);
|
||||
profile.posMasterNo = getPosMasterNo(posMaster);
|
||||
profile.org = getOrgFullName(posMaster);
|
||||
}
|
||||
const newMapProfileSalary = {
|
||||
profileId: profile.id,
|
||||
|
|
|
|||
|
|
@ -2372,7 +2372,7 @@ export class OrganizationDotnetController extends Controller {
|
|||
@Security("internalAuth")
|
||||
async GetProfileForProcessCheckInAsync(@Path() keycloakId: string) {
|
||||
try {
|
||||
console.log(`[check-keycloak] START - keycloakId=${keycloakId}`);
|
||||
// console.log(`[check-keycloak] START - keycloakId=${keycloakId}`);
|
||||
|
||||
/* =========================
|
||||
* 1. Load profile (Officer)
|
||||
|
|
@ -2447,14 +2447,14 @@ export class OrganizationDotnetController extends Controller {
|
|||
child4DnaId: currentHolder?.orgChild4?.ancestorDNA ?? null,
|
||||
};
|
||||
|
||||
console.log(
|
||||
`[check-keycloak] SUCCESS_EMPLOYEE - keycloakId=${keycloakId}, profileType=EMPLOYEE`,
|
||||
);
|
||||
// console.log(
|
||||
// `[check-keycloak] SUCCESS_EMPLOYEE - keycloakId=${keycloakId}, profileType=EMPLOYEE`,
|
||||
// );
|
||||
|
||||
return new HttpSuccess(mapProfile);
|
||||
}
|
||||
|
||||
console.log(`[check-keycloak] OFFICER_FOUND - keycloakId=${keycloakId}`);
|
||||
// console.log(`[check-keycloak] OFFICER_FOUND - keycloakId=${keycloakId}`);
|
||||
|
||||
/* =========================================
|
||||
* 2. current holder (Officer)
|
||||
|
|
@ -2494,9 +2494,9 @@ export class OrganizationDotnetController extends Controller {
|
|||
child4DnaId: currentHolder?.orgChild4?.ancestorDNA ?? null,
|
||||
};
|
||||
|
||||
console.log(
|
||||
`[check-keycloak] SUCCESS_OFFICER - keycloakId=${keycloakId}, profileType=OFFICER`,
|
||||
);
|
||||
// console.log(
|
||||
// `[check-keycloak] SUCCESS_OFFICER - keycloakId=${keycloakId}, profileType=OFFICER`,
|
||||
// );
|
||||
|
||||
return new HttpSuccess(mapProfile);
|
||||
} catch (error: any) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export async function handleInternalAuth(request: express.Request) {
|
|||
throw new HttpError(HttpStatus.UNAUTHORIZED, "Invalid API Key");
|
||||
}
|
||||
|
||||
console.log(`[InternalAuth] Authentication successful`);
|
||||
// console.log(`[InternalAuth] Authentication successful`);
|
||||
|
||||
return {
|
||||
sub: "internal_service",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue