회원 탈퇴와 덱 일괄 삭제 추가

This commit is contained in:
2026-06-25 17:11:31 +09:00
parent a5b7d720d6
commit 2c4f622408
27 changed files with 613 additions and 51 deletions

View File

@@ -56,10 +56,16 @@ export function saveAvatarImage(userId, dataUrl) {
/**
* 아바타 이미지 삭제
* @param {number|string} userId
* @returns {boolean}
*/
export function deleteAvatarImage(userId) {
const filePath = path.join(getAvatarsDir(), `${userId}.png`);
if (fs.existsSync(filePath)) {
if (!fs.existsSync(filePath)) return false;
try {
fs.unlinkSync(filePath);
return true;
} catch (err) {
console.warn(`[avatar] 삭제 실패: ${filePath}`, err);
return false;
}
}