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:
Sam Atkins 2024-05-08 18:53:36 +01:00
parent 2604dae83c
commit 8c70efa058
2 changed files with 4 additions and 0 deletions

View File

@ -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=?`,

View File

@ -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 = ?`,