yazid138 3 年之前
父节点
当前提交
2f10e556fd
共有 1 个文件被更改,包括 4 次插入8 次删除
  1. 4 8
      controller/graph.controller.js

+ 4 - 8
controller/graph.controller.js

@@ -402,14 +402,10 @@ exports.jumlahStatusLaporan = handleError(async (req, res) => {
       dataPembina.map((e) => `${e.pt.pembina.id};${e.pt.pembina.nama}`)
     ),
   ]
-  dataPembina = dataPembina.map((e) => {
-    const id = e.split(';')[0]
-    const name = e.split(';')[1]
-    return {
-      id,
-      name,
-    }
-  })
+  dataPembina = dataPembina.map((e) => ({
+    id: e.split(';')[0],
+    name: e.split(';')[1],
+  }))
 
   let data = await Promise.all(
     dataPembina.map(async (e) => {