From 188e2b74ce69fa22c4ab5bb10e07b2abd6c26522 Mon Sep 17 00:00:00 2001 From: arjun Date: Sun, 26 Nov 2023 17:29:09 +0700 Subject: [PATCH] update data can be nullable --- api/handlers/juz.js | 2 +- api/handlers/surah.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/handlers/juz.js b/api/handlers/juz.js index de769ed..a3548ad 100644 --- a/api/handlers/juz.js +++ b/api/handlers/juz.js @@ -10,7 +10,7 @@ class JuzHandler { code: 404, status: 'Not Found.', message: `Juz "${juz}" is not found.`, - data: {} + data: null }); } diff --git a/api/handlers/surah.js b/api/handlers/surah.js index d9ad34b..715d9c3 100644 --- a/api/handlers/surah.js +++ b/api/handlers/surah.js @@ -31,7 +31,7 @@ class SurahHandler { code: 404, status: 'Not Found.', message: `Surah "${surah}" is not found.`, - data: {} + data: null }); } @@ -43,7 +43,7 @@ class SurahHandler { code: 404, status: 'Not Found.', message: `Surah "${surah}" is not found.`, - data: {} + data: null }); } const checkAyah = checkSurah.verses[ayah - 1]; @@ -52,7 +52,7 @@ class SurahHandler { code: 404, status: 'Not Found.', message: `Ayah "${ayah}" in surah "${surah}" is not found.`, - data: {} + data: null }); }