Skip to content

Commit

Permalink
working on review
Browse files Browse the repository at this point in the history
  • Loading branch information
psachmann committed Jan 20, 2025
1 parent 93f6c71 commit 581bdc3
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class FilesStorageController {
@ApiResponse({ status: 403, type: ForbiddenException })
@ApiResponse({ status: 500, type: InternalServerErrorException })
@Post('/upload-from-url/:storageLocation/:storageLocationId/:parentType/:parentId')
async uploadFromUrl(
public async uploadFromUrl(
@Body() body: FileUrlParams,
@Param() params: FileRecordParams,
@CurrentUser() currentUser: ICurrentUser
Expand All @@ -78,7 +78,7 @@ export class FilesStorageController {
@ApiResponse({ status: 500, type: InternalServerErrorException })
@ApiConsumes('multipart/form-data')
@Post('/upload/:storageLocation/:storageLocationId/:parentType/:parentId')
async upload(
public async upload(
@Body() _: FileParams,
@Param() params: FileRecordParams,
@CurrentUser() currentUser: ICurrentUser,
Expand Down Expand Up @@ -109,7 +109,7 @@ export class FilesStorageController {
@ApiResponse({ status: 500, type: InternalServerErrorException })
@ApiHeader({ name: 'Range', required: false })
@Get('/download/:fileRecordId/:fileName')
async download(
public async download(
@Param() params: DownloadFileParams,
@CurrentUser() currentUser: ICurrentUser,
@Req() req: Request,
Expand All @@ -135,7 +135,7 @@ export class FilesStorageController {
@ApiHeader({ name: 'Range', required: false })
@ApiHeader({ name: 'If-None-Match', required: false })
@Get('/preview/:fileRecordId/:fileName')
async downloadPreview(
public async downloadPreview(
@Param() params: DownloadFileParams,
@CurrentUser() currentUser: ICurrentUser,
@Query() previewParams: PreviewParams,
Expand Down Expand Up @@ -196,7 +196,7 @@ export class FilesStorageController {
@ApiResponse({ status: 400, type: ApiValidationError })
@ApiResponse({ status: 403, type: ForbiddenException })
@Get('/list/:storageLocation/:storageLocationId/:parentType/:parentId')
async list(
public async list(
@Param() params: FileRecordParams,
@Query() pagination: PaginationParams
): Promise<FileRecordListResponse> {
Expand All @@ -219,7 +219,7 @@ export class FilesStorageController {
})
@Patch('/rename/:fileRecordId/')
@UseInterceptors(RequestLoggingInterceptor)
async patchFilename(
public async patchFilename(
@Param() params: SingleFileParams,
@Body() renameFileParam: RenameFileParams
): Promise<FileRecordResponse> {
Expand All @@ -240,7 +240,7 @@ export class FilesStorageController {
@ApiResponse({ status: 500, type: InternalServerErrorException })
@Delete('/delete/:storageLocation/:storageLocationId/:parentType/:parentId')
@UseInterceptors(RequestLoggingInterceptor)
async deleteByParent(@Param() params: FileRecordParams): Promise<FileRecordListResponse> {
public async deleteByParent(@Param() params: FileRecordParams): Promise<FileRecordListResponse> {
const [fileRecords, total] = await this.filesStorageUC.deleteFilesOfParent(params);
const response = FileRecordMapper.mapToFileRecordListResponse(fileRecords, total);

Expand All @@ -254,7 +254,7 @@ export class FilesStorageController {
@ApiResponse({ status: 500, type: InternalServerErrorException })
@Delete('/delete/:fileRecordId')
@UseInterceptors(RequestLoggingInterceptor)
async deleteFile(@Param() params: SingleFileParams): Promise<FileRecordResponse> {
public async deleteFile(@Param() params: SingleFileParams): Promise<FileRecordResponse> {
const fileRecord = await this.filesStorageUC.deleteOneFile(params);

const response = FileRecordMapper.mapToFileRecordResponse(fileRecord);
Expand All @@ -267,7 +267,7 @@ export class FilesStorageController {
@ApiResponse({ status: 400, type: ApiValidationError })
@ApiResponse({ status: 403, type: ForbiddenException })
@Post('/restore/:storageLocation/:storageLocationId/:parentType/:parentId')
async restore(@Param() params: FileRecordParams): Promise<FileRecordListResponse> {
public async restore(@Param() params: FileRecordParams): Promise<FileRecordListResponse> {
const [fileRecords, total] = await this.filesStorageUC.restoreFilesOfParent(params);

const response = FileRecordMapper.mapToFileRecordListResponse(fileRecords, total);
Expand All @@ -280,7 +280,7 @@ export class FilesStorageController {
@ApiResponse({ status: 400, type: ApiValidationError })
@ApiResponse({ status: 403, type: ForbiddenException })
@Post('/restore/:fileRecordId')
async restoreFile(@Param() params: SingleFileParams): Promise<FileRecordResponse> {
public async restoreFile(@Param() params: SingleFileParams): Promise<FileRecordResponse> {
const fileRecord = await this.filesStorageUC.restoreOneFile(params);

const response = FileRecordMapper.mapToFileRecordResponse(fileRecord);
Expand All @@ -294,7 +294,7 @@ export class FilesStorageController {
@ApiResponse({ status: 403, type: ForbiddenException })
@ApiResponse({ status: 500, type: InternalServerErrorException })
@Post('/copy/:storageLocation/:storageLocationId/:parentType/:parentId')
async copy(
public async copy(
@Param() params: FileRecordParams,
@Body() copyFilesParam: CopyFilesOfParentParams,
@CurrentUser() currentUser: ICurrentUser
Expand All @@ -311,7 +311,7 @@ export class FilesStorageController {
@ApiResponse({ status: 404, type: NotFoundException })
@ApiResponse({ status: 500, type: InternalServerErrorException })
@Post('/copy/:fileRecordId')
async copyFile(
public async copyFile(
@Param() params: SingleFileParams,
@Body() copyFileParam: CopyFileParams,
@CurrentUser() currentUser: ICurrentUser
Expand Down

0 comments on commit 581bdc3

Please sign in to comment.