update on category

This commit is contained in:
Mann Patel
2025-04-20 12:50:46 -06:00
parent d169c9ba58
commit 6ef4a22e9f
5 changed files with 127 additions and 109 deletions

View File

@@ -4,7 +4,6 @@ exports.getAllCategory = async (req, res) => {
try {
const [data, fields] = await db.execute(`SELECT * FROM Category`);
// Format as { ID: "", ID: "" }
const formattedData = {};
data.forEach((row) => {
formattedData[row.CategoryID] = row.Name;