mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00: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;
|
||||
|
||||
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');
|
||||
|
Loading…
Reference in New Issue
Block a user