mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
Suppress remaining eslint errors
These two seem like bugs but are unclear to me how to fix, so I've added FIXMEs. /puter/packages/backend/src/routers/kvstore/clearItems.js 41:32 error 'DB_MODE_WRITE' is not defined no-undef /puter/packages/backend/src/routers/whoami.js 104:35 error 'db' is not defined no-undef
This commit is contained in:
parent
2604dae83c
commit
8c70efa058
@ -38,6 +38,8 @@ module.exports = eggspress('/clearItems', {
|
||||
}
|
||||
|
||||
const svc_mysql = req.services.get('mysql');
|
||||
// TODO: Check if used anywhere, maybe remove
|
||||
// eslint-disable-next-line no-undef
|
||||
const dbrw = svc_mysql.get(DB_MODE_WRITE, 'kvstore-clearItems');
|
||||
await dbrw.execute(
|
||||
`DELETE FROM kv WHERE user_id=? AND app=?`,
|
||||
|
@ -101,6 +101,8 @@ WHOAMI_POST.post('/whoami', auth, fs, express.json(), async (req, response, next
|
||||
if(req.query.return_desktop_items === 1 || req.query.return_desktop_items === '1' || req.query.return_desktop_items === 'true'){
|
||||
// by cached desktop id
|
||||
if(req.user.desktop_id){
|
||||
// TODO: Check if used anywhere, maybe remove
|
||||
// eslint-disable-next-line no-undef
|
||||
desktop_items = await db.read(
|
||||
`SELECT * FROM fsentries
|
||||
WHERE user_id = ? AND parent_uid = ?`,
|
||||
|
Loading…
Reference in New Issue
Block a user