From 0fc0a6b95c8cc2b3f03b768e12f073f3ace99aa7 Mon Sep 17 00:00:00 2001 From: wayanrivan Date: Mon, 27 Apr 2026 10:20:43 +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 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;