Skip to content

Commit

Permalink
Merge pull request #470 from internxt/chore/add-extended-exception-to…
Browse files Browse the repository at this point in the history
…-move-file-folders

[PB-3686] chore: added extended exception filter to move files and folders
  • Loading branch information
apsantiso authored Feb 7, 2025
2 parents 51c5de8 + 19f83b8 commit f4f7937
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/file/file.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Post,
Put,
Query,
UseFilters,
UseGuards,
UsePipes,
ValidationPipe,
Expand Down Expand Up @@ -42,6 +43,7 @@ import { StorageNotificationService } from '../../externals/notifications/storag
import { Client } from '../auth/decorators/client.decorator';
import { getPathDepth } from '../../lib/path';
import { Requester } from '../auth/decorators/requester.decorator';
import { ExtendedHttpExceptionFilter } from '../../common/http-exception-filter-extended.exception';

const filesStatuses = ['ALL', 'EXISTS', 'TRASHED', 'DELETED'] as const;

Expand Down Expand Up @@ -325,6 +327,7 @@ export class FileController {
},
])
@WorkspacesInBehalfValidationFile()
@UseFilters(ExtendedHttpExceptionFilter)
async moveFile(
@UserDecorator() user: User,
@Param('uuid') fileUuid: File['uuid'],
Expand Down
2 changes: 2 additions & 0 deletions src/modules/folder/folder.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import { Workspace } from '../workspaces/domains/workspaces.domain';
import { getPathDepth } from '../../lib/path';
import { CheckFoldersExistenceOldDto } from './dto/folder-existence-in-folder-old.dto';
import { Requester } from '../auth/decorators/requester.decorator';
import { ExtendedHttpExceptionFilter } from '../../common/http-exception-filter-extended.exception';

const foldersStatuses = ['ALL', 'EXISTS', 'TRASHED', 'DELETED'] as const;

Expand Down Expand Up @@ -870,6 +871,7 @@ export class FolderController {
},
])
@WorkspacesInBehalfValidationFolder()
@UseFilters(ExtendedHttpExceptionFilter)
async moveFolder(
@UserDecorator() user: User,
@Param('uuid') folderUuid: Folder['uuid'],
Expand Down

0 comments on commit f4f7937

Please sign in to comment.