diff --git a/src/controllers/user.ts b/src/controllers/user.ts index 9c1444d..1a673d3 100644 --- a/src/controllers/user.ts +++ b/src/controllers/user.ts @@ -138,7 +138,7 @@ export class UserController { ...user, profile_picture: user.profile_picture ?? null, file_profile_picture: user.profile_picture - ? `${config.server.host_swagger}uploads/doctor-picture/${user.profile_picture}` + ? `${config.server.host_swagger}uploads/doctor-profile/${user.profile_picture}` : null, })); @@ -719,10 +719,10 @@ export class UserController { const data = await userRepository.findOneBy({ id: param.id }); if (data != null) { - const doctorprofile = await UserController.uploadFile(req.files, 'profile_picture', 'uploads/doctor-picture'); + const doctorprofile = await UserController.uploadFile(req.files, 'profile_picture', 'uploads/doctor-profile'); if (doctorprofile) { if (data.profile_picture) { - const oldFilePath = path.join('uploads/doctor-picture', data.profile_picture); + const oldFilePath = path.join('uploads/doctor-profile', data.profile_picture); await UserController.deleteFile(oldFilePath); } data.profile_picture = doctorprofile;