yazid138 2 年之前
父節點
當前提交
537d9d35aa
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      controller/sanksi.controller.js

+ 3 - 3
controller/sanksi.controller.js

@@ -355,13 +355,13 @@ exports.getAll = handleError(async (req, res) => {
     if (jawaban === 'false') {
       where.$or = [
         {
-        "pengajuan.cabut_sanksi": {
-          $exists: true, $ne: null}
+          "pengajuan.cabut_sanksi": {
+            $exists: true, $ne: null},
         }, {
           bypass_cabut_sanksi: true,
-          aktif: true,
         }
       ]
+      where.aktif = true
       // where.$or = where.$or.map(e => ({ ...e, ['pengajuan.cabut_sanksi']: { $exists: true, $ne: null } }))
       // where['jawaban.cabut_sanksi'] = { $exists: true, $ne: null }
     }