|
|
@@ -128,13 +128,16 @@ exports.getOne = handleError(async (req, res) => {
|
|
|
const { sanksi_id } = req.params
|
|
|
|
|
|
const w = {}
|
|
|
- const { banding } = req.query
|
|
|
+ const { banding, aktif } = req.query
|
|
|
if (banding === 'true') {
|
|
|
w.banding = true
|
|
|
w['pengajuan.keberatan'] = { $exists: true, $ne: null }
|
|
|
w['jawaban.keberatan'] = { $exists: true, $ne: null }
|
|
|
w['pengajuan.banding'] = { $exists: true, $ne: null }
|
|
|
}
|
|
|
+ if (aktif && aktif === 'false') {
|
|
|
+ w.aktif = false
|
|
|
+ }
|
|
|
|
|
|
const sanksi = await cekSatuDataSanksi(res, user, sanksi_id, w)
|
|
|
if (!sanksi) return
|