mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-24 23:38:40 +08:00
fix: update apps cache by reading from primary db
This commit is contained in:
parent
164d5ef167
commit
e8f67da9a3
@ -240,11 +240,11 @@ async function refresh_apps_cache(options, override){
|
|||||||
let app;
|
let app;
|
||||||
|
|
||||||
if(options.name)
|
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)
|
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)
|
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 {
|
else {
|
||||||
log.error('invalid options to refresh_apps_cache');
|
log.error('invalid options to refresh_apps_cache');
|
||||||
throw new Error('Invalid options provided');
|
throw new Error('Invalid options provided');
|
||||||
|
Loading…
Reference in New Issue
Block a user