diff --git a/src/backend/src/routers/filesystem_api/batch/PathResolver.js b/src/backend/src/routers/filesystem_api/batch/PathResolver.js index d2b75d1d..e4d3d9c1 100644 --- a/src/backend/src/routers/filesystem_api/batch/PathResolver.js +++ b/src/backend/src/routers/filesystem_api/batch/PathResolver.js @@ -17,7 +17,7 @@ * along with this program. If not, see . */ const APIError = require('../../../api/APIError.js'); -const { relativeSelector, NodeUIDSelector } = require('../../../filesystem/node/selectors.js'); +const { relativeSelector } = require('../../../filesystem/node/selectors.js'); const ERR_INVALID_PATHREF = 'Invalid path reference in path: '; const ERR_UNKNOWN_PATHREF = 'Unknown path reference in path: '; diff --git a/src/backend/src/routers/filesystem_api/batch/all.js b/src/backend/src/routers/filesystem_api/batch/all.js index 96dccdf1..700bea66 100644 --- a/src/backend/src/routers/filesystem_api/batch/all.js +++ b/src/backend/src/routers/filesystem_api/batch/all.js @@ -19,18 +19,15 @@ const APIError = require("../../../api/APIError"); const eggspress = require("../../../api/eggspress"); const config = require("../../../config"); -const PathResolver = require("./PathResolver"); const { Context } = require("../../../util/context"); const Busboy = require('busboy'); const { BatchExecutor } = require("../../../filesystem/batch/BatchExecutor"); const { TeePromise } = require('@heyputer/putility').libs.promise; -const { EWMA, MovingMode } = require("../../../util/opmath"); +const { MovingMode } = require("../../../util/opmath"); const { get_app } = require('../../../helpers'); const { valid_file_size } = require("../../../util/validutil"); const { OnlyOnceFn } = require("../../../util/fnutil.js"); -const commands = require('../../../filesystem/batch/commands.js').commands; - module.exports = eggspress('/batch', { subdomain: 'api', verified: true, @@ -137,8 +134,6 @@ module.exports = eggspress('/batch', { const pending_operations = []; const response_promises = []; const fileinfos = []; - let total = 0; - let total_tbd = true; const on_nonfile_data_end = OnlyOnceFn(() => { if ( request_error ) { @@ -223,10 +218,6 @@ module.exports = eggspress('/batch', { } }); - let i = 0; - let ended = []; - let ps = []; - busboy.on('file', async (fieldname, stream, detais) => { if ( batch_exe.total_tbd ) { batch_exe.total_tbd = false; diff --git a/src/backend/src/routers/filesystem_api/batch/prepare.js b/src/backend/src/routers/filesystem_api/batch/prepare.js deleted file mode 100644 index f3cb5950..00000000 --- a/src/backend/src/routers/filesystem_api/batch/prepare.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2024 Puter Technologies Inc. - * - * This file is part of Puter. - * - * Puter is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */