From b6a9d957aaceec7c31cbbebdae23f5b1a9b66021 Mon Sep 17 00:00:00 2001 From: jelveh Date: Sat, 23 Nov 2024 10:44:45 -0800 Subject: [PATCH] tweak: clean up some dead imports --- src/backend/src/routers/apps.js | 4 ++-- src/backend/src/routers/change_email.js | 4 +--- src/backend/src/routers/confirm-email.js | 1 - src/backend/src/routers/contactUs.js | 1 - src/backend/src/routers/open_item.js | 4 ---- src/backend/src/routers/save_account.js | 2 -- src/backend/src/routers/sign.js | 2 +- src/backend/src/routers/signup.js | 2 +- src/backend/src/routers/suggest_apps.js | 2 +- src/backend/src/routers/verify-pass-recovery-token.js | 3 +-- src/backend/src/routers/writeFile.js | 1 - src/gui/src/UI/UIWindowTaskManager.js | 1 - 12 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/backend/src/routers/apps.js b/src/backend/src/routers/apps.js index 1aa5896e..f99cfbd6 100644 --- a/src/backend/src/routers/apps.js +++ b/src/backend/src/routers/apps.js @@ -21,8 +21,8 @@ const express = require('express'); const router = new express.Router(); const auth = require('../middleware/auth.js'); const config = require('../config'); -const { app_name_exists, refresh_apps_cache, chkperm, convert_path_to_fsentry, get_app } = require('../helpers'); -const { DB_WRITE, DB_READ } = require('../services/database/consts.js'); +const { get_app } = require('../helpers'); +const { DB_READ } = require('../services/database/consts.js'); const subdomain = require('../middleware/subdomain.js'); // -----------------------------------------------------------------------// diff --git a/src/backend/src/routers/change_email.js b/src/backend/src/routers/change_email.js index 18f240a8..2c0c1902 100644 --- a/src/backend/src/routers/change_email.js +++ b/src/backend/src/routers/change_email.js @@ -17,11 +17,9 @@ * along with this program. If not, see . */ "use strict" -const validator = require('validator'); -const crypto = require('crypto'); const eggspress = require('../api/eggspress.js'); const APIError = require('../api/APIError.js'); -const { DB_READ, DB_WRITE } = require('../services/database/consts.js'); +const { DB_WRITE } = require('../services/database/consts.js'); const config = require('../config.js'); diff --git a/src/backend/src/routers/confirm-email.js b/src/backend/src/routers/confirm-email.js index d187b2cb..d8269e2b 100644 --- a/src/backend/src/routers/confirm-email.js +++ b/src/backend/src/routers/confirm-email.js @@ -18,7 +18,6 @@ */ "use strict" const express = require('express'); -const { invalidate_cached_user } = require('../helpers'); const router = new express.Router(); const auth = require('../middleware/auth.js'); const { DB_WRITE } = require('../services/database/consts'); diff --git a/src/backend/src/routers/contactUs.js b/src/backend/src/routers/contactUs.js index 6b8ae829..dd951df3 100644 --- a/src/backend/src/routers/contactUs.js +++ b/src/backend/src/routers/contactUs.js @@ -20,7 +20,6 @@ const express = require('express'); const router = express.Router(); const auth = require('../middleware/auth.js'); -const config = require('../config'); const { get_user, generate_random_str } = require('../helpers'); const { DB_WRITE } = require('../services/database/consts.js'); diff --git a/src/backend/src/routers/open_item.js b/src/backend/src/routers/open_item.js index ce7e2cb8..7bb8d1d4 100644 --- a/src/backend/src/routers/open_item.js +++ b/src/backend/src/routers/open_item.js @@ -17,10 +17,6 @@ * along with this program. If not, see . */ "use strict" -const express = require('express'); -const router = new express.Router(); -const auth = require('../middleware/auth.js'); -const config = require('../config'); const eggspress = require('../api/eggspress.js'); const FSNodeParam = require('../api/filesystem/FSNodeParam.js'); const { Context } = require('../util/context.js'); diff --git a/src/backend/src/routers/save_account.js b/src/backend/src/routers/save_account.js index 5036ea5c..675794ad 100644 --- a/src/backend/src/routers/save_account.js +++ b/src/backend/src/routers/save_account.js @@ -22,9 +22,7 @@ const router = new express.Router(); const {get_taskbar_items, username_exists, send_email_verification_code, send_email_verification_token, invalidate_cached_user, get_user } = require('../helpers'); const auth = require('../middleware/auth.js'); const config = require('../config'); -const { Context } = require('../util/context'); const { DB_WRITE } = require('../services/database/consts'); -const { can } = require('../util/langutil.js'); // -----------------------------------------------------------------------// // POST /save_account diff --git a/src/backend/src/routers/sign.js b/src/backend/src/routers/sign.js index 1813d098..7bb070d0 100644 --- a/src/backend/src/routers/sign.js +++ b/src/backend/src/routers/sign.js @@ -17,7 +17,7 @@ * along with this program. If not, see . */ "use strict" -const {sign_file, convert_path_to_fsentry, uuid2fsentry, chkperm, get_app} = require('../helpers'); +const {sign_file, get_app} = require('../helpers'); const eggspress = require('../api/eggspress.js'); const APIError = require('../api/APIError.js'); const { Context } = require('../util/context.js'); diff --git a/src/backend/src/routers/signup.js b/src/backend/src/routers/signup.js index f061d66d..4957abbb 100644 --- a/src/backend/src/routers/signup.js +++ b/src/backend/src/routers/signup.js @@ -19,7 +19,7 @@ "use strict" const express = require('express'); const router = new express.Router(); -const {get_taskbar_items, generate_random_username, generate_system_fsentries, body_parser_error_handler, send_email_verification_code, send_email_verification_token, username_exists, invalidate_cached_user_by_id, get_user } = require('../helpers'); +const {get_taskbar_items, generate_random_username, generate_system_fsentries, send_email_verification_code, send_email_verification_token, username_exists, invalidate_cached_user_by_id, get_user } = require('../helpers'); const config = require('../config'); const eggspress = require('../api/eggspress'); const { Context } = require('../util/context'); diff --git a/src/backend/src/routers/suggest_apps.js b/src/backend/src/routers/suggest_apps.js index cc1b70d0..53c645f6 100644 --- a/src/backend/src/routers/suggest_apps.js +++ b/src/backend/src/routers/suggest_apps.js @@ -42,7 +42,7 @@ router.post('/suggest_apps', auth, express.json(), async (req, res, next)=>{ return res.status(400).send({message: '`uid` or `path` required'}) // modules - const {convert_path_to_fsentry, uuid2fsentry, chkperm, suggest_app_for_fsentry} = require('../helpers') + const {convert_path_to_fsentry, uuid2fsentry, suggest_app_for_fsentry} = require('../helpers') let fsentry; // by uid diff --git a/src/backend/src/routers/verify-pass-recovery-token.js b/src/backend/src/routers/verify-pass-recovery-token.js index be5caa63..558da651 100644 --- a/src/backend/src/routers/verify-pass-recovery-token.js +++ b/src/backend/src/routers/verify-pass-recovery-token.js @@ -20,8 +20,7 @@ const express = require('express') const router = new express.Router() const config = require('../config') -const { invalidate_cached_user_by_id, get_user } = require('../helpers') -const { DB_WRITE } = require('../services/database/consts') +const { get_user } = require('../helpers') const jwt = require('jsonwebtoken'); diff --git a/src/backend/src/routers/writeFile.js b/src/backend/src/routers/writeFile.js index 8d7accfc..7e42ec6f 100644 --- a/src/backend/src/routers/writeFile.js +++ b/src/backend/src/routers/writeFile.js @@ -20,7 +20,6 @@ const express = require('express'); const router = new express.Router(); const {uuid2fsentry, validate_signature_auth, get_url_from_req, sign_file} = require('../helpers'); -const multer = require('multer'); const fs = require('../middleware/fs.js'); const { NodePathSelector, NodeUIDSelector } = require('../filesystem/node/selectors'); const eggspress = require('../api/eggspress'); diff --git a/src/gui/src/UI/UIWindowTaskManager.js b/src/gui/src/UI/UIWindowTaskManager.js index 5ff1e3ff..3716030c 100644 --- a/src/gui/src/UI/UIWindowTaskManager.js +++ b/src/gui/src/UI/UIWindowTaskManager.js @@ -19,7 +19,6 @@ import { END_HARD, END_SOFT } from "../definitions.js"; import UIAlert from "./UIAlert.js"; import UIContextMenu from "./UIContextMenu.js"; -import UIWindow from "./UIWindow.js"; import { Component, defineComponent } from '../util/Component.js'; import UIComponentWindow from './UIComponentWindow.js'; import Table from './Components/Table.js';