Fix sw error
This commit is contained in:
@@ -952,7 +952,7 @@ module.exports.confirmMobile = [
|
|||||||
|
|
||||||
/// //////////////////////////////////////////////////////////////////// user managemnet by admin
|
/// //////////////////////////////////////////////////////////////////// user managemnet by admin
|
||||||
module.exports.get_all_users_for_admin = [
|
module.exports.get_all_users_for_admin = [
|
||||||
(req, res) => {
|
(req, res) => {
|
||||||
User.find(
|
User.find(
|
||||||
{
|
{
|
||||||
scope: ['user'],
|
scope: ['user'],
|
||||||
@@ -962,7 +962,7 @@ module.exports.get_all_users_for_admin = [
|
|||||||
},
|
},
|
||||||
(err, data) => {
|
(err, data) => {
|
||||||
if (err) return res500(res, err)
|
if (err) return res500(res, err)
|
||||||
return res.json(data)
|
return res.status(200).json(data)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -9,12 +9,12 @@ const closePwaDialogBtn = document.querySelector('#closePwaDialog')
|
|||||||
// functions
|
// functions
|
||||||
function showCustomInstallPromotion() {
|
function showCustomInstallPromotion() {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
customDialog.classList.add('active')
|
customDialog?.classList.add('active')
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
function hideCustomInstallPromotion() {
|
function hideCustomInstallPromotion() {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
customDialog.classList.remove('active')
|
customDialog?.classList.remove('active')
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,11 +30,11 @@ window.addEventListener('beforeinstallprompt', e => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
events.forEach(evt => {
|
events.forEach(evt => {
|
||||||
closePwaDialogBtn.addEventListener(evt, e => {
|
closePwaDialogBtn?.addEventListener(evt, e => {
|
||||||
hideCustomInstallPromotion()
|
hideCustomInstallPromotion()
|
||||||
})
|
})
|
||||||
|
|
||||||
installBtn.addEventListener(evt, e => {
|
installBtn?.addEventListener(evt, e => {
|
||||||
// Hide the app provided install promotion
|
// Hide the app provided install promotion
|
||||||
hideCustomInstallPromotion()
|
hideCustomInstallPromotion()
|
||||||
// Show the install prompt
|
// Show the install prompt
|
||||||
@@ -50,7 +50,7 @@ events.forEach(evt => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
try {
|
try {
|
||||||
showPwaDialogBtn.addEventListener(evt, e => {
|
showPwaDialogBtn?.addEventListener(evt, e => {
|
||||||
if (deferredPrompt) {
|
if (deferredPrompt) {
|
||||||
showCustomInstallPromotion()
|
showCustomInstallPromotion()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user