update fav

This commit is contained in:
Mann Patel
2025-04-12 11:29:46 -06:00
parent 10f0469b56
commit 0e32389482

View File

@@ -6,7 +6,7 @@ exports.addToFavorite = async (req, res) => {
try { try {
// Use parameterized query to prevent SQL injection // Use parameterized query to prevent SQL injection
const [result] = await db.execute( const [result] = await db.execute(
"INSERT INTO Favorites (UserID, ProductID) VALUES (?, ?)", "INSERT INTO Favorites (UserID, ProductID) VALUES unique(?, ?)",
[userID, productsID], [userID, productsID],
); );