Merge pull request #174 from Frappet/fix-script

send admin token
This commit is contained in:
AdisakKanthawilang 2025-10-06 10:36:49 +07:00 committed by GitHub
commit 79b8e9f1ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1536,7 +1536,7 @@ export class CommandController extends Controller {
_profile.lastUpdatedAt = _Date;
if (_profile.keycloak != null && _profile.keycloak != "") {
// console.log("4. disable keycloak/authen")
const delUserKeycloak = await deleteUser(_profile.keycloak);
const delUserKeycloak = await deleteUser(_profile.keycloak, adminToken);
if (delUserKeycloak) {
_profile.keycloak = "";
_profile.roleKeycloaks = [];
@ -1589,7 +1589,7 @@ export class CommandController extends Controller {
_profileEmp.lastUpdatedAt = _Date;
if (_profileEmp.keycloak != null && _profileEmp.keycloak != "") {
// disable keycloak/authen
const delUserKeycloak = await deleteUser(_profileEmp.keycloak);
const delUserKeycloak = await deleteUser(_profileEmp.keycloak, adminToken);
if (delUserKeycloak) {
_profileEmp.keycloak = "";
_profileEmp.roleKeycloaks = [];