From 3b9880c4a4dbb2f1ca0e3a5c05a3175d6d942730 Mon Sep 17 00:00:00 2001 From: seoyeoneel02 Date: Mon, 23 Sep 2024 16:58:51 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20wish=20=EC=82=AD=EC=A0=9C=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80=20#130?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/domains/closet/closet.dao.js | 3 ++- src/domains/closet/closet.sql.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/domains/closet/closet.dao.js b/src/domains/closet/closet.dao.js index da60484..6125f3e 100644 --- a/src/domains/closet/closet.dao.js +++ b/src/domains/closet/closet.dao.js @@ -4,7 +4,7 @@ import { status } from "../../config/response.status.js"; import { myClosetItem, myClosetCategoryItem, myClosetSearchItem, myClosetSearchCategoryItem, getClothByClothId, getUserByClothId, getRealSizeByClothId, brandToBrandName, insertBrand, getBrand, insertCloth, insertRealSize, getCloth, - updateCloth, updateRealSize, myClothSizeDel, myClothDel } from "./closet.sql.js"; + updateCloth, updateRealSize, myClothSizeDel, myClothWishDel, myClothDel } from "./closet.sql.js"; // cloth 반환 export const getMyClosetPreview = async (userId, name, category) => { @@ -154,6 +154,7 @@ export const clothDel = async (userId, clothId) => { try { const conn = await pool.getConnection(); await pool.query(myClothSizeDel, parseInt(clothId)); + await pool.query(myClothWishDel, parseInt(clothId)); await pool.query(myClothDel, [userId, parseInt(clothId)]); const cloth = await pool.query(getCloth, parseInt(clothId)); diff --git a/src/domains/closet/closet.sql.js b/src/domains/closet/closet.sql.js index 6aa4fad..eccc5b8 100644 --- a/src/domains/closet/closet.sql.js +++ b/src/domains/closet/closet.sql.js @@ -70,5 +70,8 @@ export const updateRealSize = export const myClothSizeDel = "DELETE FROM real_size WHERE cloth_id = ? ;" +export const myClothWishDel = +"DELETE FROM wish WHERE cloth_id = ? ;" + export const myClothDel = "DELETE FROM cloth WHERE uuid = ? AND id = ? ;" \ No newline at end of file