From ae06ef5aa4137fce495d58f4a2e831523c6764e5 Mon Sep 17 00:00:00 2001 From: devhelper47607 Date: Tue, 1 Dec 2026 20:29:38 +0000 Subject: [PATCH] :sparkles: Add Data safety information to search results --- index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 56d3643..7fe57dd 100644 --- a/index.js +++ b/index.js @@ -97,7 +97,18 @@ fastify.get( await queue.addAll([ ...search.map(item => () => push(item)), ...search.map(({ appId }) => async () => push(await googlePlay.app({ appId }))), - ...search.map(({ appId }) => async () => push({ appId, permissions: await googlePlay.permissions({ appId }) })) + ...search.map(({ appId }) => async () => push({ appId, permissions: await googlePlay.permissions({ appId }) })), + ...search.map(({ appId }) => async () => { + try { + push({ appId, dataSafety: await googlePlay.datasafety({ appId }) }); + } + catch(error){ + console.error(`Could not fetch data safety for ${appId}:`, error); + // Empty object is a known, safe "no data safety information" marker, + // and keeps other apps in the queue unaffected. + push({ appId, dataSafety: {} }); + } + }) ]); })().catch(error => { if([ -- 2.47.3