From 9b8ac2ceaf06fee89bac4df671e023f0f454d398 Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Sun, 1 Dec 2024 13:38:13 +0700 Subject: [PATCH] update get list role --- src/controllers/auth.ts | 68 ++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/controllers/auth.ts b/src/controllers/auth.ts index 350a914..0f1f0be 100644 --- a/src/controllers/auth.ts +++ b/src/controllers/auth.ts @@ -149,46 +149,46 @@ export class AuthController { list_child[p.id_parent].push(p); } - for (let f of list_data_final) { - delete f.status - delete f.created_at - delete f.updated_at - delete f.deleted_at + // for (let f of list_data_final) { + // delete f.status + // delete f.created_at + // delete f.updated_at + // delete f.deleted_at - if (list_child[f.id]) { - f.children = list_child[f.id]; + // if (list_child[f.id]) { + // f.children = list_child[f.id]; - for (let g of f.children) { - if (list_child[g.id]) { - g.children = list_child[g.id]; + // for (let g of f.children) { + // if (list_child[g.id]) { + // g.children = list_child[g.id]; - for (let h of g.children) { - if (list_child[h.id]) { - h.children = list_child[h.id]; + // for (let h of g.children) { + // if (list_child[h.id]) { + // h.children = list_child[h.id]; - for (let i of h.children) { - if (list_child[i.id]) { - i.children = list_child[i.id]; + // for (let i of h.children) { + // if (list_child[i.id]) { + // i.children = list_child[i.id]; - for (let j of i.children) { - if (list_child[j.id]) { - j.children = list_child[j.id]; + // for (let j of i.children) { + // if (list_child[j.id]) { + // j.children = list_child[j.id]; - for (let k of j.children) { - if (list_child[k.id]) { - k.children = list_child[k.id]; - } - } - } - } - } - } - } - } - } - } - } - } + // for (let k of j.children) { + // if (list_child[k.id]) { + // k.children = list_child[k.id]; + // } + // } + // } + // } + // } + // } + // } + // } + // } + // } + // } + // } return list_data_final;