Compare commits
No commits in common. "1e68045793e296934d5252b9b0320dd5c528a747" and "59c5cfb9bf028f110c6f6d1e0f248380f800b926" have entirely different histories.
1e68045793
...
59c5cfb9bf
1 changed files with 3 additions and 9 deletions
|
|
@ -4676,10 +4676,8 @@ export class CommandController extends Controller {
|
|||
const _year = new Date(profile.birthDate.toDateString()).getFullYear() + 543;
|
||||
password = `${_date}${_month}${_year}`;
|
||||
}
|
||||
// กรอง "." ออกจาก firstName ก่อนส่งไป keycloak
|
||||
const sanitizedFirstName = profile.firstName?.replace(/\./g, "") ?? "";
|
||||
userKeycloakId = await createUser(profile.citizenId, password, {
|
||||
firstName: sanitizedFirstName,
|
||||
firstName: profile.firstName,
|
||||
lastName: profile.lastName,
|
||||
});
|
||||
const list = await getRoles();
|
||||
|
|
@ -6879,10 +6877,8 @@ export class CommandController extends Controller {
|
|||
}
|
||||
console.log("[Excexute/CreateOfficerProfile] Calling createUser for:", item.bodyProfile.citizenId);
|
||||
console.log("[Excexute/CreateOfficerProfile] createUser data - firstName:", item.bodyProfile.firstName, "lastName:", item.bodyProfile.lastName);
|
||||
// กรอง "." ออกจาก firstName ก่อนส่งไป keycloak (ป้องกัน . หรืออักขระอื่นๆ)
|
||||
const sanitizedFirstName = item.bodyProfile.firstName?.replace(/\./g, "") ?? "";
|
||||
userKeycloakId = await createUser(item.bodyProfile.citizenId, password, {
|
||||
firstName: sanitizedFirstName,
|
||||
firstName: item.bodyProfile.firstName,
|
||||
lastName: item.bodyProfile.lastName,
|
||||
});
|
||||
if (userKeycloakId && typeof userKeycloakId === "object" && userKeycloakId.errorMessage) {
|
||||
|
|
@ -8027,10 +8023,8 @@ export class CommandController extends Controller {
|
|||
const _year = new Date(profile.birthDate.toDateString()).getFullYear() + 543;
|
||||
password = `${_date}${_month}${_year}`;
|
||||
}
|
||||
// กรอง "." ออกจาก firstName ก่อนส่งไป keycloak
|
||||
const sanitizedFirstName = profile.firstName?.replace(/\./g, "") ?? "";
|
||||
const userKeycloakId = await createUser(profile.citizenId, password, {
|
||||
firstName: sanitizedFirstName,
|
||||
firstName: profile.firstName,
|
||||
lastName: profile.lastName,
|
||||
// email: profile.email,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue