Skip to content

Commit 062e23b

Browse files
committed
fix: Correct APIError imports
APIError is the only thing exported from its file, so we must not wrap it in {}.
1 parent 0b093dd commit 062e23b

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

packages/backend/src/api/filesystem/FlagParam.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* You should have received a copy of the GNU Affero General Public License
1717
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
19-
const { APIError } = require('../../api/APIError');
19+
const APIError = require('../../api/APIError');
2020

2121
module.exports = class FlagParam {
2222
constructor (srckey, options) {

packages/backend/src/api/filesystem/StringParam.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* You should have received a copy of the GNU Affero General Public License
1717
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
19-
const { APIError } = require('../../api/APIError');
19+
const APIError = require('../../api/APIError');
2020

2121
module.exports = class StringParam {
2222
constructor (srckey, options) {

packages/backend/src/filesystem/hl_operations/hl_data_read.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const { stream_to_buffer } = require("../../util/streamutil");
2020
const { HLFilesystemOperation } = require("./definitions");
2121
const { chkperm } = require('../../helpers');
2222
const { LLRead } = require('../ll_operations/ll_read');
23-
const { APIError } = require('../../api/APIError');
23+
const APIError = require('../../api/APIError');
2424

2525
/**
2626
* HLDataRead reads a stream of objects from a file containing structured data.

packages/backend/src/filesystem/hl_operations/hl_stat.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
const { chkperm } = require("../../helpers");
2020
const { Context } = require("../../util/context");
2121
const { HLFilesystemOperation } = require("./definitions");
22-
const { APIError } = require('../../api/APIError');
22+
const APIError = require('../../api/APIError');
2323

2424
class HLStat extends HLFilesystemOperation {
2525
static MODULES = {

packages/backend/src/filesystem/ll_operations/ll_rmnode.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
const { Context } = require("../../util/context");
2020
const { ParallelTasks } = require("../../util/otelutil");
2121
const { LLFilesystemOperation } = require("./definitions");
22-
const { APIError } = require("../../api/APIError");
22+
const APIError = require("../../api/APIError");
2323

2424
class LLRmNode extends LLFilesystemOperation {
2525
async _run () {

packages/backend/src/routers/auth/list-permissions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const { get_app, get_user } = require("../../helpers");
2121
const { UserActorType } = require("../../services/auth/Actor");
2222
const { DB_READ } = require("../../services/database/consts");
2323
const { Context } = require("../../util/context");
24-
const { APIError } = require('../../api/APIError');
24+
const APIError = require('../../api/APIError');
2525

2626
module.exports = eggspress('/auth/list-permissions', {
2727
subdomain: 'api',

packages/backend/src/routers/auth/list-sessions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const eggspress = require("../../api/eggspress");
22
const { UserActorType } = require("../../services/auth/Actor");
33
const { Context } = require("../../util/context");
4-
const { APIError } = require('../../api/APIError');
4+
const APIError = require('../../api/APIError');
55

66
module.exports = eggspress('/auth/list-sessions', {
77
subdomain: 'api',

packages/backend/src/routers/auth/revoke-user-app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
const eggspress = require("../../api/eggspress");
2020
const { UserActorType } = require("../../services/auth/Actor");
2121
const { Context } = require("../../util/context");
22-
const { APIError } = require('../../api/APIError');
22+
const APIError = require('../../api/APIError');
2323

2424
module.exports = eggspress('/auth/revoke-user-app', {
2525
subdomain: 'api',

0 commit comments

Comments
 (0)