Skip to content

Commit 5babff7

Browse files
committed
fix: unlink file in update profile service
1 parent 1c352f3 commit 5babff7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/modules/user/user.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const updateProfileToDB = async (
6363
}
6464

6565
//unlink file here
66-
if (payload.image) {
66+
if (payload.image && isExistUser.image) {
6767
unlinkFile(isExistUser.image);
6868
}
6969

0 commit comments

Comments
 (0)