From 98243b9385fc8fd38312179f3b264b1d5f163c10 Mon Sep 17 00:00:00 2001 From: wayanrivan Date: Mon, 27 Apr 2026 10:10:23 +0700 Subject: [PATCH] update --- src/controllers/user.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/user.ts b/src/controllers/user.ts index ac81220..9c1444d 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/profile-picture/${user.profile_picture}` + ? `${config.server.host_swagger}uploads/doctor-picture/${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/profile-picture'); + const doctorprofile = await UserController.uploadFile(req.files, 'profile_picture', 'uploads/doctor-picture'); if (doctorprofile) { if (data.profile_picture) { - const oldFilePath = path.join('uploads/profile-picture', data.profile_picture); + const oldFilePath = path.join('uploads/doctor-picture', data.profile_picture); await UserController.deleteFile(oldFilePath); } data.profile_picture = doctorprofile;