update get list role

This commit is contained in:
2024-12-01 13:38:13 +07:00
parent a5f78121f1
commit 9b8ac2ceaf

View File

@ -149,46 +149,46 @@ export class AuthController {
list_child[p.id_parent].push(p); list_child[p.id_parent].push(p);
} }
for (let f of list_data_final) { // for (let f of list_data_final) {
delete f.status // delete f.status
delete f.created_at // delete f.created_at
delete f.updated_at // delete f.updated_at
delete f.deleted_at // delete f.deleted_at
if (list_child[f.id]) { // if (list_child[f.id]) {
f.children = list_child[f.id]; // f.children = list_child[f.id];
for (let g of f.children) { // for (let g of f.children) {
if (list_child[g.id]) { // if (list_child[g.id]) {
g.children = list_child[g.id]; // g.children = list_child[g.id];
for (let h of g.children) { // for (let h of g.children) {
if (list_child[h.id]) { // if (list_child[h.id]) {
h.children = list_child[h.id]; // h.children = list_child[h.id];
for (let i of h.children) { // for (let i of h.children) {
if (list_child[i.id]) { // if (list_child[i.id]) {
i.children = list_child[i.id]; // i.children = list_child[i.id];
for (let j of i.children) { // for (let j of i.children) {
if (list_child[j.id]) { // if (list_child[j.id]) {
j.children = list_child[j.id]; // j.children = list_child[j.id];
for (let k of j.children) { // for (let k of j.children) {
if (list_child[k.id]) { // if (list_child[k.id]) {
k.children = list_child[k.id]; // k.children = list_child[k.id];
} // }
} // }
} // }
} // }
} // }
} // }
} // }
} // }
} // }
} // }
} // }
} // }
return list_data_final; return list_data_final;