From abb4a36ec7efe55b0c583993371919565a3e8f52 Mon Sep 17 00:00:00 2001 From: Sinan Date: Wed, 25 Sep 2024 22:06:04 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20profile=20image=20s3=20location?= =?UTF-8?q?=20changed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/use_case/doctor/AuthenticationUseCase.ts | 2 +- server/src/use_case/patient/PatientUseCases.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/use_case/doctor/AuthenticationUseCase.ts b/server/src/use_case/doctor/AuthenticationUseCase.ts index dc7a9694..c6d7a723 100644 --- a/server/src/use_case/doctor/AuthenticationUseCase.ts +++ b/server/src/use_case/doctor/AuthenticationUseCase.ts @@ -131,7 +131,7 @@ export default class AuthenticationUseCase { this.validatorService.validateIdFormat(id); const doctor = await this.doctorRepository.findByID(id); if (!doctor) throw new CustomError("Not Found", StatusCode.NotFound); - const key = `profile-images/${id}-${Date.now()}`; + const key = `profile-images/doctor/${id}-${Date.now()}`; const url = await this.cloudService.generatePreSignedUrl(process.env.S3_BUCKET_NAME!, key, 30); return { url, key }; } diff --git a/server/src/use_case/patient/PatientUseCases.ts b/server/src/use_case/patient/PatientUseCases.ts index 5f30e734..cf3e71cd 100644 --- a/server/src/use_case/patient/PatientUseCases.ts +++ b/server/src/use_case/patient/PatientUseCases.ts @@ -38,7 +38,7 @@ export default class PatientUseCase { const patient = await this.patientRepository.findById(id); if (!patient) throw new CustomError("Patient not found", StatusCode.NotFound); - const key = `profile-images/${id}-${Date.now()}`; + const key = `profile-images/patient/${id}-${Date.now()}`; const url = await this.cloudStorageService.generatePreSignedUrl(process.env.S3_BUCKET_NAME!, key, 30); return { url, key }; }