From 867c4feb103e302468ee140b564dc719d8431731 Mon Sep 17 00:00:00 2001 From: devleejb Date: Tue, 26 Nov 2024 17:04:19 +0900 Subject: [PATCH] Remove unused functions --- backend/src/files/files.service.ts | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/backend/src/files/files.service.ts b/backend/src/files/files.service.ts index 81bfffce..9f1c5d58 100644 --- a/backend/src/files/files.service.ts +++ b/backend/src/files/files.service.ts @@ -1,4 +1,4 @@ -import { GetObjectCommand, PutObjectCommand, S3Client, S3ClientConfig } from "@aws-sdk/client-s3"; +import { GetObjectCommand, PutObjectCommand, S3Client } from "@aws-sdk/client-s3"; import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; import { BadRequestException, @@ -14,7 +14,6 @@ import * as htmlPdf from "html-pdf-node"; import * as MarkdownIt from "markdown-it"; import { PrismaService } from "src/db/prisma.service"; import { generateRandomKey } from "src/utils/functions/random-string"; -import { StorageType } from "src/utils/types/storage.type"; import { CreateUploadPresignedUrlResponse } from "./types/create-upload-url-response.type"; import { ExportFileRequestBody, ExportFileResponse } from "./types/export-file.type"; @@ -126,27 +125,4 @@ export class FilesService { fileName: `${fileName}.pdf`, }; } - - private getStorageConfig = (): S3ClientConfig => { - const bucketType: StorageType = this.configService.get("BUCKET_TYPE") || "S3"; - const region = this.configService.get("AWS_REGION") || "us-east-1"; - if (bucketType === "MINIO") { - const endpoint = this.configService.get("MINIO_ENDPOINT"); - const accessKeyId = this.configService.get("MINIO_ACCESS_KEY"); - const secretAccessKey = this.configService.get("MINIO_SECRET_KEY"); - return { - region, - endpoint, - forcePathStyle: true, - credentials: { - accessKeyId, - secretAccessKey, - }, - }; - } - - return { - region, - }; - }; }