From e8f67da9a3d81273f59d136c8383f00d9dc8ca5a Mon Sep 17 00:00:00 2001 From: jelveh Date: Fri, 8 Nov 2024 10:56:00 -0800 Subject: [PATCH] fix: update apps cache by reading from primary db --- src/backend/src/helpers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/src/helpers.js b/src/backend/src/helpers.js index 18e484e2..e60d24e7 100644 --- a/src/backend/src/helpers.js +++ b/src/backend/src/helpers.js @@ -240,11 +240,11 @@ async function refresh_apps_cache(options, override){ let app; if(options.name) - app = await db.read('SELECT * FROM apps WHERE name = ?', [options.name]); + app = await db.pread('SELECT * FROM apps WHERE name = ?', [options.name]); else if(options.uid) - app = await db.read('SELECT * FROM apps WHERE uid = ?', [options.uid]); + app = await db.pread('SELECT * FROM apps WHERE uid = ?', [options.uid]); else if(options.id) - app = await db.read('SELECT * FROM apps WHERE id = ?', [options.id]); + app = await db.pread('SELECT * FROM apps WHERE id = ?', [options.id]); else { log.error('invalid options to refresh_apps_cache'); throw new Error('Invalid options provided');