Skip to content

Commit

Permalink
📦 profile image s3 location changed
Browse files Browse the repository at this point in the history
  • Loading branch information
sinanptm committed Sep 25, 2024
1 parent 928971c commit abb4a36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/use_case/doctor/AuthenticationUseCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/use_case/patient/PatientUseCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand Down

1 comment on commit abb4a36

@vercel
Copy link

@vercel vercel bot commented on abb4a36 Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.