yazid138 3 lat temu
rodzic
commit
2f10e556fd
1 zmienionych plików z 4 dodań i 8 usunięć
  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) => {