Skip to content

Commit

Permalink
fix: Correct APIError imports
Browse files Browse the repository at this point in the history
APIError is the only thing exported from its file, so we must not wrap
it in {}.
  • Loading branch information
AtkinsSJ committed May 15, 2024
1 parent 0b093dd commit 062e23b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/backend/src/api/filesystem/FlagParam.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
const { APIError } = require('../../api/APIError');
const APIError = require('../../api/APIError');

module.exports = class FlagParam {
constructor (srckey, options) {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/api/filesystem/StringParam.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
const { APIError } = require('../../api/APIError');
const APIError = require('../../api/APIError');

module.exports = class StringParam {
constructor (srckey, options) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { stream_to_buffer } = require("../../util/streamutil");
const { HLFilesystemOperation } = require("./definitions");
const { chkperm } = require('../../helpers');
const { LLRead } = require('../ll_operations/ll_read');
const { APIError } = require('../../api/APIError');
const APIError = require('../../api/APIError');

/**
* HLDataRead reads a stream of objects from a file containing structured data.
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/filesystem/hl_operations/hl_stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
const { chkperm } = require("../../helpers");
const { Context } = require("../../util/context");
const { HLFilesystemOperation } = require("./definitions");
const { APIError } = require('../../api/APIError');
const APIError = require('../../api/APIError');

class HLStat extends HLFilesystemOperation {
static MODULES = {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/filesystem/ll_operations/ll_rmnode.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
const { Context } = require("../../util/context");
const { ParallelTasks } = require("../../util/otelutil");
const { LLFilesystemOperation } = require("./definitions");
const { APIError } = require("../../api/APIError");
const APIError = require("../../api/APIError");

class LLRmNode extends LLFilesystemOperation {
async _run () {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/routers/auth/list-permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const { get_app, get_user } = require("../../helpers");
const { UserActorType } = require("../../services/auth/Actor");
const { DB_READ } = require("../../services/database/consts");
const { Context } = require("../../util/context");
const { APIError } = require('../../api/APIError');
const APIError = require('../../api/APIError');

module.exports = eggspress('/auth/list-permissions', {
subdomain: 'api',
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/routers/auth/list-sessions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const eggspress = require("../../api/eggspress");
const { UserActorType } = require("../../services/auth/Actor");
const { Context } = require("../../util/context");
const { APIError } = require('../../api/APIError');
const APIError = require('../../api/APIError');

module.exports = eggspress('/auth/list-sessions', {
subdomain: 'api',
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/routers/auth/revoke-user-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
const eggspress = require("../../api/eggspress");
const { UserActorType } = require("../../services/auth/Actor");
const { Context } = require("../../util/context");
const { APIError } = require('../../api/APIError');
const APIError = require('../../api/APIError');

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

0 comments on commit 062e23b

Please sign in to comment.